Description Usage Arguments Details Value Examples
Filters numeric columns by requiring a minimum amount of variance
1 |
x |
Input data, which should be either a data frame or matrix. |
min |
Minimum amount of variance to require per column. |
This function omits missing values.
Returns data frame (or matrix, depending on input class) with all non-numeric columns and only those numeric columns that meet the minimum amount of variance.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## set seed (for replication purposes)
set.seed(206195)
## create data set
d <- data_set(
w = rnorm(100, 0, 0.0),
v = rnorm(100, 0, 0.5),
x = rnorm(100, 0, 1.0),
y = rnorm(100, 0, 2.0),
z = rnorm(100, 0, 3.0)
)
## minimum var of 1.0 (default)
min_var(d)
## min variance of 0.1
min_var(d, 0.1)
## min var of 2.0
min_var(d, 2.0)
## min var of 6.0
min_var(d, 6.0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.