| dimNA< - | R Documentation |
Sets the dimension of an object with the option to infer one dimension automatically.
If one of the elements in the dimension vector is NA, then its value
is inferred from the length of the object and the other elements in the
dimension vector. If the inferred dimension is not an integer, an
error is thrown.
## Default S3 replacement method:
dimNA(x) <- value
x |
An R object. |
value |
|
Returns (invisibly) what dim<-() returns
(see dim() for more details).
Henrik Bengtsson
dim().
x <- 1:12
dimNA(x) <- c(2,NA,3)
stopifnot(dim(x) == as.integer(c(2,2,3)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.