Filter()
subsetting vectors eg x[!is.na(x)].
slices
Reduce()
length()
Map()
is.[x]
typeof
random numbers
set.seed
factors in r: ordered, unordered
as.name
as.[x]
c function is concatenate
a = c(1, 2, 3)
a <- c(1, 2, 3)
defining using eg 1L to get variable types
nested vector just a vector
y <- c( 1, 2 , 3)
y <- c(c(1, 2), 3)
y <- c(x, 1).
complex numbers, other number types in r
getting sequences, 1:30 etc
seq() function rep() function
is R copy on write? what happens if you set y = x? copies or just two pointers?
a <- c(1, 2, 3)
b <- c(a, 1)
a <- c(1, 2, 3)
b <- a + 1
substituting by conditions. eg
y[y<0]<-0
and or in R
what happens when make anything? all on heap with variable just being pointer?
infinity in R
inf eg 1/0 (-inf?)
+ most simple is a vector + arithmetic page: * does stuff for each entry in vector eg x + 2 * summary stuf for vector. sum, min, max, len etc + null, na etc in R + nan
+ see what name points to: * eg if x <- c(1,2,3) * y <- x * addresses are same * if modify, addresses are different * only creates copy when needs to * aka copy on modify * r objects generally immutable * tra
overflows of numbers in r. eg what happens if int gets too big
dates and times in base R (other data types, int log etc)