View source: R/ch.filterGrpByQuantile.r
ch.filterGrpByQuantile | R Documentation |
This function filters the data, it can be grouped using a grouping variable, between a low quantile threshold and/or a high quantile threshold. It returns a list that contains a dataframe of the removed data, a dataframe of the the kept data, the number of datapoints removed, and the percentage of points removed.
ch.filterGrpByQuantile(
data,
dataCol,
grpCol = NULL,
lowQuantileThreshold = 0,
highQuantileThreshold = 1
)
data |
a dataframe containing the data. |
dataCol |
a string that specifies the name of the column in "data" on which the thresholds are to act. |
grpCol |
a string or vector of strings that specify the names of the column in "data" that act as grouping variables. |
lowQuantileThreshold |
A decimal between 0 and 1 that specifies the low quantile threshold, that the data must be above to be kept. |
highQuantileThreshold |
A decimal between 0 and 1 that specifies the high quantile threshold, that the data must be below to be kept. |
a list containing: (datRemoved) a dataframe with the removed data as grouped by grpCol; (datKept) a dataframe with the kept data as grouped by grpCol; (numRemoved) the number of datapoints removed; (pRemoved) the proportion of datapoints removed; (datKeptRaw) a dataframe with the kept data in the raw format (ungrouped);.
ch.filterGrpByQuantile (data=myDataFrame, "RT", "sn", lowQuantileThreshold=0.05, highQuantileThreshold=0.95)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.