Description Usage Arguments Value Examples
View source: R/SpikeRemovalFunctions.R
Mininum maximum filter.
1 2 3 4 5 6 7 8 9 10 11 | dspk.MinMaxfilter(
Data = NULL,
Value,
Min,
Max,
State.of.value.data = NULL,
state.of.value.code = 91,
default.state.of.value.code = 110,
NAvalue = NULL,
logoutput = F
)
|
Data |
A datatable or NULL |
Value |
A vector, datatable column name as a string or datatable column number as numeric |
Min |
Minimum value to keep |
Max |
Maximum value to keep |
State.of.value.data |
A vector, datatable column name as a string or datatable column number as numeric |
state.of.value.code |
number that deleted values will be taged with |
default.state.of.value.code |
number that values will be tagged with if no State.of.value.data is given |
NAvalue |
Value that should be read as NA |
logoutput |
TRUE if you want to have a logged record of what the function did |
returns a datatable with columns dspk.Values and dspk.StateOfValue containing the filtered data. If logoutput is TRUE, then $data contains the datatable and $logdata contains the info for the log file
1 2 3 4 5 6 7 8 9 10 | SomeValues <- c(5,NA,NA,NA,5,3,2,2,3,NA,8,2,3,3)
SomeTimes <- c(1,2,3,4,5,6,7,8,9,22,23,24,25,26)
ADataframe <- data.frame(SomeValues,SomeTimes)
#entering in a vector into the function.
dspk.MinMaxfilter(Value = SomeValues, Min = 3,Max = 5)
#entering a dataframe and column name into the function
dspk.MinMaxfilter(Data = ADataframe, Value = "SomeValues", Min = 3,Max = 5)
#entering a dataframe and column number into the function
dspk.MinMaxfilter(Data = ADataframe, Value = 1, Min = 3,Max = 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.