inst/snippet/access.R

xm <- matrix(1:16, nrow=4); xm
xm[5]
xm[,2]                   # this is 1 dimensional (a vector)
xm[,2,drop=FALSE]        # this is 2 dimensional (still a matrix)

Try the fastR package in your browser

Any scripts or data that you put into this service are public.

fastR documentation built on May 1, 2019, 11:18 p.m.