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

move_to

Move columns between slots


Description

Moves information from one slot to other slots. For instance from the sets to the relations.

Usage

move_to(object, from, to, columns)

## S4 method for signature 
## 'TidySet,characterORfactor,characterORfactor,character'
move_to(object, from, to, columns)

Arguments

object

A TidySet object.

from

The name of the slot where the content is.

to

The name of the slot to move the content.

columns

The name of the columns that should be moved.

Value

A TidySet object where the content is moved from one slot to other.

Methods (by class)

  • object = TidySet,from = characterORfactor,to = characterORfactor,columns = character: Move columns

See Also

Examples

x <- list("A" = c("a" = 0.1, "b" = 0.5), "B" = c("a" = 0.2, "b" = 1))
TS <- tidySet(x)
TS <- mutate_element(TS, b = runif(2))
TS2 <- move_to(TS, from = "elements", to = "relations", "b")
# Note that apparently we haven't changed anything:
TS2

BaseSet

Working with Sets the Tidy Way

v0.0.16
MIT + file LICENSE
Authors
Lluís Revilla Sancho [aut, cre] (<https://orcid.org/0000-0001-9747-2570>), Zebulun Arendsee [rev], Jennifer Chang [rev]
Initial release

We don't support your browser anymore

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