default_dataset: Get or set reference to default dataset. Experimental...

Description Usage Arguments Value See Also Examples

Description

Use data.frame or data.frame name to set it as default. Use NULL as an argument to disable default dataset. If argument is missing then function will return reference to default dataset. Use ref to modify it. Also see .compute for usage patterns.

Usage

1

Arguments

x

data.frame or data.frame name which we want to make default for some operations.

Value

formula reference to default dataset or NULL

See Also

ref

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(iris)
default_iris = iris
default_dataset(default_iris) # set default dataset

.compute({
    new_col = 1
    Sepal.Length = Sepal.Length*2 
})

# for comparison

iris$new_col = 1
iris$Sepal.Length = iris$Sepal.Length*2 
identical(iris, default_iris) # should be TRUE

default_dataset(NULL) # disable default dataset

gdemin/expss documentation built on May 16, 2019, 11:14 p.m.