Description Usage Arguments Value Examples
Select_case, subset2 base::subset()
Filter2 dplyr::filter()
Drop_NA tidyr::drop_na()
Drop_case edata[-subset, ]
1 2 3 4 5 6 7 8 9 |
... |
further arguments to be passed to or from other methods. |
subset |
Ausgewählte Fälle Position als Zahl |
x |
object to be subsetted. |
data.frame
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | dat <- data.frame(
nr= 1:5,
sex = factor(c(1, 2, 1, 2, 1), 1:3, c("m", "f", "t")),
treatment = c("A", "A", "B", "B", "A"),
m1 = c(1, NA, 2, 1, 1),
m2 = c(1, 5, NA, 1, 1),
m3 = c(2, 1, 5, 1, 1),
m4 = c(3, 2,2, 2, 1),
m5 = c(5, 2, 3, 1, 2),
m6 = c(4, 1, 4, 1, 1)
)
dat <- Label(
dat,
sex = "Geschlecht",
treatment = "Behandlung",
m1 = "Cohlesterin",
m2 = "Billirubin"
)
dat <- tibble::as_tibble(dat)
subset2(dat, treatment == "A" & sex=="m" )
Select_case(dat, treatment == "A" & sex=="m", output=FALSE)
Filter2(dat, treatment == "A" & sex=="m")
Drop_NA(dat, m1)
# tidyr::drop_na(dat,m1)
Drop_NA(dat)
Drop_case(dat, c(2:4))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.