as.empty: Convert to an empty object

Description Usage Arguments Value See Also Examples

Description

Convert x to an empty object.

Usage

1
2
3
4
5
6
7
as.empty(x, ...)

## Default S3 method:
as.empty(x, ...)

## S3 method for class 'data.frame'
as.empty(x, ...)

Arguments

x

An object.

...

Additional parameterS.

Value

An empty object

See Also

is.empty in this package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
x <- c("a", "b", "c")
as.empty(x)
class(as.empty(x)) # still a character

x <- factor(LETTERS)
as.empty(x)        # levels are kept
class(as.empty(x)) # still a factor

x <- data.frame(x = 1:3, y = 2:4)
as.empty(x)

bazar documentation built on May 2, 2019, 7:02 a.m.