empty {cmrutils} | R Documentation |
Creates empty copy of object.
empty(x)
x |
An object to create copy from. |
Returns empty (filled with NA
s) object having the same
structure and attributes as x
.
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))