Created
July 18, 2025 15:24
-
-
Save neelsoumya/4d3b8e43b3ba4d5b2c2c5802e9456e30 to your computer and use it in GitHub Desktop.
teaching basics of R variables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
a script to teach the basics of R variables and have fun!