Skip to contents

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 class '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)

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

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
#>   elements sets fuzzy         b
#> 1        a    A   0.1 0.1194854
#> 2        b    A   0.5 0.1946950
#> 3        a    B   0.2 0.1194854
#> 4        b    B   1.0 0.1946950