clean.data | R Documentation |
This is a wrapper for functions setna
and setzero
and
applies both in that order.
clean.data(dfr, f = 10, crop = c("auto", "pt", "sp"))
dfr |
The name of the data frame. |
f |
Factor for extreme values detection. |
crop |
|
The data frame must use the labels (lower or upper case) listed
in function check.names
. Then functions setna
and
setzero
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(mtwp = c(2.2, 5.0, 3.6, 12, 1600, -4, 0),
dm = c(21, 23, 105, 24, -3, 30, NA),
nmtp = c(1.3, 10, 11, NA, 2, 5, NA))
clean.data(dfr)
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(dfr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.