-
Recap/Questions
-
Everything is an object in R - including the language objects, functions, if, while, ....
-
lists, data.frames
- [, [[ and $
- Data frames and 2-D subsetting
-
Can't use logical vector in 1-D list subsetting for [[
- x[[ c(TRUE, FALSE, TRUE, ... ) ]]
- Need to use which(). But need to ensure only one or else hierarchical subsetting.
- Or
x [ logicalVector ][[1]]
-
- Subsetting by factors and keeping/dropping levels.
-
Vectorization in rnorm(), etc.
rnorm(n, mean = vector, sd = vector)
-
- Passing additional arguments
- Different apply() functions
-
- Default values for parameters
- Idioms
- warnings and errors
-
- Directory structure
- DESCRIPTION
- NAMESPACE