Hello, I am Edwin Reed-Sanchez and I love to program, hack and tinker with technology. I also enjoy teaching students the basic programming principals that are universal with all programming languages.
For this class we will be learning R, which is a widely programming language used for statistical and scientific analysis.
Sign up for Replit using your gmail account.
- Email me at ereedsanchez@gmail.com with me your username.
- My replit uysername is: replit.com/@ereedsanchez
Today we will learn about basic programs and syntax used in R.
print(“text”)
#Comments your code
x = 51
print(x)
name = “sam”
print(sam)
X <- 42
print(X);
x <- 9
y <- 3
x <- y
print(x)
#numeric
var1 <- 3.14
#integer
var2 <- 88L
print(var1)
print(var2)
#text
var3 <- "hello"
print(var3)
message <- "This is called \"escaping\"."
print(message)
will return
[1] "This is called \"escaping\"."
—
message <- "This is called \"escaping\"."
cat(message)
will return
[1] "This is called "escaping".
x <- 11
y <- 4
#addition
print(x+y)
#substraction
print(x-y)
#multiplication
print(x*y)
#division
print(x/y)
x <- 11
y <- 4
#exponentation
print(x^y) #or x**y
#modulus (remainder from division)
print(x%%y)
#integer division
print(x%/%y)