Description Usage Arguments Value Author(s) See Also Examples
View source: R/truncate_study.R
Takes a data frame and character identifiers for various columns; returns a logical vector the same length as the number of rows in the data frame.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | truncate_study(
study_data_frame,
group_name = maeve_options("group_name"),
subject_ID = maeve_options("subject_ID"),
x_name = maeve_options("x_name"),
endpoint_name = NULL,
fit = NULL,
overall_x_min = maeve_options("overall_x_min"),
overall_x_max = maeve_options("overall_x_max"),
min_n_in_group = maeve_options("min_n_in_group"),
min_frac_in_group = maeve_options("min_frac_in_group"),
min_frac_in_study = maeve_options("min_frac_in_study"),
print_warning = TRUE,
droplevels = TRUE,
drop_singletons = FALSE,
drop_singleton_IDs = TRUE,
singleton_number = 1,
truncation_return_type = maeve_options("truncation_return_type"),
reset_names = TRUE
)
|
study_data_frame |
data.frame with data to filter. |
group_name |
character with column name of treatment group factor. |
subject_ID |
character with column name of subject ID factor. |
x_name |
character with column name of x-axis numeric variable |
endpoint_name |
optional character with column name of a y-axis numeric variable. |
fit |
optional character with column name of predicted values for a y-axis numeric variable. |
overall_x_min |
numeric hard limit on the lower range of x-values. |
overall_x_max |
numeric hard limit on the upper range of x-values. |
min_n_in_group |
numeric x-values in a group will be truncated to last x-value when at least this number are still in the group. |
min_frac_in_group |
numeric x-values in a group will be truncated to last x-value when at least this fraction are still in the group. |
min_frac_in_study |
numeric x-values in a group will be truncated to last x-value when at least this fraction are still in the study.. |
print_warning |
logical whether to print warnings. |
droplevels |
logical whether to restrict factors to levels present in the data frame provided. |
drop_singletons |
logical whether to exclude *all* observations from a group if, after truncation, it has no more than one observation per subject. |
drop_singleton_IDs |
logical whether to exclude *all* observations for one ID if, after truncation, it has no more than one observation total. |
singleton_number |
numeric If all IDs in a group have "singleton_number" or few observations and drop_singletons == TRUE, the group will get dropped. |
truncation_return_type |
character string to describe output content. Must be one of "logical", "data.frame", or "list". |
reset_names |
logical whether to reset the column names to original values in optional output. |
a logical vector length equal to the number of rows in study_data_frame.
Bill Forrest forrest@gene.com
1 | cat('no working example yet')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.