Skip to content

Instantly share code, notes, and snippets.

@elowy01
Created August 5, 2022 15:03
Show Gist options
  • Save elowy01/a445f6911d96a4e7a0db9186b77b5a8f to your computer and use it in GitHub Desktop.
Save elowy01/a445f6911d96a4e7a0db9186b77b5a8f to your computer and use it in GitHub Desktop.
# square of all elements in a vector
sapply(1:10, function(i) i ^ 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment