File: dim_na.Rd

package info (click to toggle)
r-cran-listenv 0.8.0+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 308 kB
  • sloc: sh: 14; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 730 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/listenv,dims.R
\name{dim_na}
\alias{dim_na}
\alias{dim_na<-}
\title{Set the dimension of an object}
\usage{
dim_na(x) <- value
}
\arguments{
\item{x}{An \R object, e.g. a list environment, a matrix, an array, or
a data frame.}

\item{value}{A numeric vector coerced to integers.
If one of the elements is missing, then its value is inferred from the
other elements (which must be non-missing) and the length of \code{x}.}
}
\value{
An object with the dimensions set, similar to what
\code{\link[base:dim]{dim(x) <- value}} returns.
}
\description{
Set the dimension of an object
}
\examples{
x <- 1:6
dim_na(x) <- c(2, NA)
print(dim(x))  ## [1] 2 3

}