2.7 Quiz answers
You must quote non-syntactic names with backticks:
`
: for example, the variables1
,2
, and3
.data.frame(runif(3), runif(3)) df <-names(df) <- c(1, 2) $`3` <- df$`1` + df$`2` df
It occupies about 8 MB.
runif(1e6) x <- list(x, x, x) y <-obj_size(y) #> 8,000,128 B
a
is copied whenb
is modified,b[[1]] <- 10
.