Skip to contents

Removes column from a slot of the TidySet object.

Usage

remove_column(object, slot, column_names)

# S4 method for class 'TidySet,character,character'
remove_column(object, slot, column_names)

Arguments

object

A TidySet object.

slot

A TidySet slot.

column_names

The name of the columns.

Value

A TidySet object.

Methods (by class)

  • remove_column(object = TidySet, slot = character, column_names = character): Remove columns to any slot

Examples

x <- data.frame(sets = c(rep("A", 5), rep("B", 5)),
                elements = c(letters[1:5], letters[3:7]),
                extra = sample(c("YES", "NO"), 10, replace = TRUE))
TS <- tidySet(x)
TS
#>    elements sets extra fuzzy
#> 1         a    A    NO     1
#> 2         b    A    NO     1
#> 3         c    A   YES     1
#> 4         d    A    NO     1
#> 5         e    A    NO     1
#> 6         c    B   YES     1
#> 7         d    B   YES     1
#> 8         e    B   YES     1
#> 9         f    B   YES     1
#> 10        g    B   YES     1
remove_column(TS, "relations", "extra")
#>    elements sets fuzzy
#> 1         a    A     1
#> 2         b    A     1
#> 3         c    A     1
#> 4         d    A     1
#> 5         e    A     1
#> 6         c    B     1
#> 7         d    B     1
#> 8         e    B     1
#> 9         f    B     1
#> 10        g    B     1