Description Usage Arguments Value Examples
View source: R/statistic_functions.R
Allows to subset data and keeping all the attributes of the data
1 |
data |
a data.frame |
subset |
a logical vector |
a data.frame with all the attributes
1 2 3 4 5 6 7 | data(mtcars)
mtcars$nSpeed <- c(5, 6, 5, "NA", "NA", "NA", "NA", "NA", "NA", "NA",
"NA", "NA", "NA", "NA", "NA", "NA", "NA", 6, 6, 6,
"NA", "NA", "NA", "NA", "NA", 5, 5, 6, 5, 6, 6, 5)
attributes(mtcars[, "nSpeed"])$var_label <- "Number of speed in case of manual transmission"
subset <- subset_withAttributes(mtcars, mtcars$nSpeed != "NA")
attributes(subset[, "nSpeed"])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.