Description Usage Arguments Details Value See Also Examples
View source: R/selectByIndex.R
This function select objects by their position specified by index.
1 | selectByIndex(index, ...)
|
index |
a numeric value or vector specifying position. |
... |
an arbitrary number of objects to be selected. |
This function select object by their position specified by index. When index is vector, a list of selected objects is returned. Main use of this function is to select time-specific covariate with getIndex
function.
a selected object or a list of selected objects.
1 2 3 4 5 6 | id <- 1:10
cov1 <- rnorm(10)
cov2 <- rbinom(10, 4, 0.5)
cov3 <- runif(10)
covset1 <- selectByIndex(c(1,2), id, cov1, cov2, cov3)
cov <- selectByIndex(3, id, cov1, cov2, cov3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.