powered by
Fetch specified columns from a population or population model.
select(x, target = NULL, where = NULL, rowids = NULL)
an EDP population from population(...) or an EDP population model from popmod(...)
population(...)
popmod(...)
a character vector of column names, defaults to names(pm) minus names(where)
names(pm)
names(where)
a list of conditions to select on; list(a = "x", c = 3) means only to return rows where a is "x" and c is 3.
list(a = "x", c = 3)
a
c
a list of integer row ids to return. These row ids match the row names returned by select. rowids is exclusive with where.
select
rowids
where
a data frame with the columns specified in target.
target
# NOT RUN { # } # NOT RUN { # similar to SQL "SELECT a, b FROM pm WHERE c = 4;" select(pm, c("a", "b"), where = list(c = 4)) select(pm, c("a", "b"), rowids = c(7, 22)) # }
Run the code above in your browser using DataLab