setzero.sp | R Documentation |
0
for sweetpotato data.Set values to 0
for harvested traits.
setzero.sp(dfr)
dfr |
The name of the data frame. |
This function sets values to 0
for all traits at harvest
(noph
, nopr
, vw
, nocr
, nonc
, crw
,
and ncrw
) which are NA
according to the following rules:
If noph == 0
, then all traits are set to 0
.
If all traits are 0
, then noph
is set to 0
.
If nopr == 0
, then all traits with exception of vw
are set to 0
.
If all traits with exception of vw
are 0
, then
nopr
is set to 0
.
If nocr == 0
, then crw
is set to 0
.
If crw == 0
, then nocr
is set to 0
.
If nonc == 0
, then ncrw
is set to 0
.
If ncrw == 0
, then nonc
is set to 0
.
It returns a data frame and a list of warnings with all the rows that have been modified.
Raul Eyzaguirre
dfr <- data.frame(noph = c(NA, 0, 3, 3, 3, 3, 3),
nopr = c(NA, 0, 0, 2, 3, 3, 3),
vw = c(NA, NA, 3, 2, 3, 3, 6),
crw = c(NA, NA, NA, NA, 8, 2, 0),
ncrw = c(NA, NA, NA, 2, NA, 2, 4),
nocr = c(NA, NA, NA, 0, 6, 2, 0),
nonc = c(NA, NA, NA, 4, 0, 3, 5))
setzero.sp(dfr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.