millerdl, 2 months ago TIL: R has NROW and NCOL as well as nrow and ncol. NROW will treat an (n)-vector as an (n \times 1) matrix: > NROW(rep(0, 10)) [1] 10 > nrow(rep(0, 10)) NULL #rstats
TIL: R has NROW and NCOL as well as nrow and ncol.
NROW will treat an (n)-vector as an (n \times 1) matrix:
> NROW(rep(0, 10)) [1] 10 > nrow(rep(0, 10)) NULL
#rstats
edzer, 2 months ago @millerdl on our time scale, NROW and NCOL are relatively recent additions
@millerdl on our time scale, NROW and NCOL are relatively recent additions
DataAngler, 2 months ago @edzer @millerdl So is this equivalent to length() except that NROW() is making it an nX1 matrix in the background? #rstats
@edzer @millerdl So is this equivalent to length() except that NROW() is making it an nX1 matrix in the background? #rstats
Add comment