data <- use_data_titanic(count = FALSE)
glimpse(data)
#> Rows: 2,201
#> Columns: 4
#> $ Class <chr> "3rd", "3rd", "3rd", "3rd", "3rd", "3rd", "3rd", "3rd", "3rd"~
#> $ Sex <chr> "Male", "Male", "Male", "Male", "Male", "Male", "Male", "Male~
#> $ Age <chr> "Child", "Child", "Child", "Child", "Child", "Child", "Child"~
#> $ Survived <chr> "No", "No", "No", "No", "No", "No", "No", "No", "No", "No", "~
data <- data %>% clean_var(Age, name = "age")
glimpse(data)
#> Rows: 2,201
#> Columns: 4
#> $ Class <chr> "3rd", "3rd", "3rd", "3rd", "3rd", "3rd", "3rd", "3rd", "3rd"~
#> $ Sex <chr> "Male", "Male", "Male", "Male", "Male", "Male", "Male", "Male~
#> $ age <chr> "Child", "Child", "Child", "Child", "Child", "Child", "Child"~
#> $ Survived <chr> "No", "No", "No", "No", "No", "No", "No", "No", "No", "No", "~
drop_var_no_variance()
Drop all variables with no
variancedrop_var_not_numeric()
Drop all not numeric
variablesdrop_var_low_variance()
Drop all variables with low
variancedrop_var_by_names()
Drop variables by namedrop_var_with_na()
Drop all variables with
NA-valuesdata <- use_data_beer()
data %>% describe_tbl()
#> 161 observations with 11 variables
#> 19 observations containing missings (NA)
#> 5 variables containing missings (NA)
#> 1 variables with no variance
drop_obs_with_na()
Drop all observations with
NA-valuesdata %>%
drop_obs_with_na() %>%
describe_tbl()
#> 142 observations with 11 variables
#> 0 observations containing missings (NA)
#> 0 variables containing missings (NA)
#> 1 variables with no variance
drop_obs_if()
Drop all observations where expression is
true