subset_xpdb | R Documentation |
Use filter()
to select rows/cases where conditions are true.
Unlike base subsetting, rows where the condition evaluates to NA are dropped.
Use slice()
to select row/cases by their position
## S3 method for class 'xpose_data'
filter(.data, ..., .problem, .source, .where)
## S3 method for class 'xpose_data'
slice(.data, ..., .problem, .source, .where)
## S3 method for class 'xpose_data'
distinct(.data, ..., .problem, .source, .where)
.data |
An xpose database object. |
... |
Name-value pairs of expressions. Use These arguments are automatically quoted and evaluated in the context of the data frame. They support unquoting and splicing. See the dplyr vignette("programming") for an introduction to these concepts. |
.problem |
The problem from which the data will be modified |
.source |
The source of the data in the xpdb. Can either be 'data' or an output file extension e.g. 'phi'. |
.where |
A vector of element names to be edited in special (e.g.
|
# Subset by condition
xpdb_ex_pk %>%
filter(DV < 1, .problem = 1) %>%
dv_vs_ipred()
# Subset by positions
xpdb_ex_pk %>%
slice(1:100, .problem = 1) %>%
dv_vs_ipred()
# Deduplicate rows
xpdb_ex_pk %>%
distinct(TIME, .problem = 1) %>%
dv_vs_ipred()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.