Last data update: 2014.03.03
|
R: Helper Routine
Helper Routine
Description
Creates empty copy of object.
Usage
empty(x)
Arguments
x |
An object to create copy from.
|
Value
Returns empty (filled with NA s) object having the same
structure and attributes as x .
Examples
empty(0)
empty(1:10)
empty(matrix(1:4, 2, 2))
empty(array(1:24, dim = c(2, 3, 4)))
empty(list(a = 1, b = 2))
empty(data.frame(a = 1:2, b = 3:4))
empty(ts(1:10, frequency = 5))
Results
|