millerdl,
@millerdl@mathstodon.xyz avatar

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

edzer,
@edzer@mastodon.social avatar

@millerdl on our time scale, NROW and NCOL are relatively recent additions

DataAngler,
@DataAngler@vis.social avatar

@edzer @millerdl
So is this equivalent to length() except that NROW() is making it an nX1 matrix in the background?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • osvaldo12
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • Durango
  • Leos
  • Youngstown
  • thenastyranch
  • slotface
  • rosin
  • kavyap
  • mdbf
  • cubers
  • ethstaker
  • anitta
  • khanakhh
  • tacticalgear
  • provamag3
  • ngwrru68w68
  • everett
  • GTA5RPClips
  • modclub
  • normalnudes
  • megavids
  • cisconetworking
  • tester
  • JUstTest
  • lostlight
  • All magazines