[Rd] Inconsistency between row and nrow

Gabor Grothendieck ggrothend|eck @end|ng |rom gm@||@com
Sun Sep 8 13:30:36 CEST 2024


In the following nrow provides the expected result but row gives an
error.  I would have thought that they would both work or both fail.

  aa <- array(dim = 5:3)

  nrow(aa)
  ## [1] 5

  row(aa)
  ## Error in row(aa) : a matrix-like object is required as argument to 'row'

  # this does work:
  slice.index(aa, 1)

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



More information about the R-devel mailing list