ch.filterDataBetween: A function to filter data between two thresholds

View source: R/ch.filterDataBetween.r

ch.filterDataBetweenR Documentation

A function to filter data between two thresholds

Description

This function filters the data between a low threshold and/or a high 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.

Usage

ch.filterDataBetween(data, dataCol, lowThresh = NULL, highThresh = NULL)

Arguments

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.

lowThresh

the lower threshold that the data must be above to be kept.

highThresh

the higher threshold that the data must be below to be kept.

Value

a list containing: (datRemoved) a dataframe with the removed data; (datKept) a dataframe with the kept data; (numRemoved) the number of datapoints removed; (pRemoved) the proportion of datapoints removed.

Examples

ch.filterDataBetween (data=myDataFrame, "RT", 200, 5000)

ccpluncw/ccpl_R_chutils documentation built on Nov. 22, 2024, 5:18 a.m.