# x gets 2, print x
x <- 2
x[1] 2
# Make y from x, print y
y <- 3 * x
y[1] 6
Spring 2026 | Data 2 (399)
Jeffrey M. Girard | Lecture 03a
Store reusable data in named objects using assignment (<-)
Transform data and objects using one or more functions
office <- 7858640841
a-Z0-9_.age ≠ Age)Error in parse(text = input): <text>:2:8: unexpected symbol
1: # Don't try to add spaces
2: second age
^
x^0.5 is the square root of x?sqrt(x) is the square root of x?Note: there are corresponding asin(), acos(), and atan() functions.