View source: R/clean_data_sp.R
clean.data.sp | R Documentation |
This is a wrapper for functions setna.sp
and setzero.sp
and
applies both in that order.
clean.data.sp(dfr, f = 10)
dfr |
The name of the data frame. |
f |
Factor for extreme values detection. |
The data frame must use the labels (lower or upper case) listed
in function check.names.sp
. Then functions setna.sp
and
setzero.sp
are applied to the data.
It returns the data frame with all impossible values set to NA
,
some values set to 0
and a list of warnings with all the rows that have
been modified.
Raul Eyzaguirre.
dfr <- data.frame(crw = c(2.2, 5.0, 3.6, 12, 1600, -4, 0),
dm = c(21, 23, 105, 24, -3, 30, NA),
nocr = c(1.3, 10, 11, NA, 2, 5, NA),
scol = c(1, 0, 15, 5, 4, 7, NA),
fcol.cc = c(1, 15, 12, 24, 55, 20, NA))
clean.data.sp(dfr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.