Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

default_dataset

Get or set reference to default dataset. Experimental feature.


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

default_dataset(x)

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

Examples

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

expss

Tables, Labels and Some Useful Functions from Spreadsheets and 'SPSS' Statistics

v0.10.7
GPL (>= 2)
Authors
Gregory Demin [aut, cre], Sebastian Jeworutzki [ctb] (<https://orcid.org/0000-0002-2671-5253>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.