empty: Helper Routine

Description Usage Arguments Value Examples

Description

Creates empty copy of object.

Usage

1
empty(x)

Arguments

x

An object to create copy from.

Value

Returns empty (filled with NAs) object having the same structure and attributes as x.

Examples

1
2
3
4
5
6
7
8
9
  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))

cmrutils documentation built on May 1, 2019, 7:59 p.m.

Related to empty in cmrutils...