Skip to content

Instantly share code, notes, and snippets.

@neelsoumya
Created July 18, 2025 15:24
Show Gist options
  • Select an option

  • Save neelsoumya/4d3b8e43b3ba4d5b2c2c5802e9456e30 to your computer and use it in GitHub Desktop.

Select an option

Save neelsoumya/4d3b8e43b3ba4d5b2c2c5802e9456e30 to your computer and use it in GitHub Desktop.
teaching basics of R variables
1 + 2
h <- 1 + 2
?mean
mean(m)
weight_kg <- 67.6
67.6 * 2.2
weight_kg <- 67.6 * 2
weight_kg <- weight_kg * 2.2
weight_kg <- weight_kg * 2.2
# this is a test script
sqrt(a)
a <- 17
sqrt(a)
b <- "hello"
sqrt(b)
c<- 3
sqrt(b,c)
d<- 4
weight_vector <- c(50, 60, 70)
weight_vector <- c(50, 60, 70, b)
"50"
50
b <- "hello"/10
b <- "hello" * 3
b <- "hello" / "world"
b <- hello
@neelsoumya
Copy link
Author

a script to teach the basics of R variables and have fun!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment