Description Usage Arguments Author(s) See Also Examples
Sometimes, after having read in data, one needs to
replace certain values by NA
. One approach
is to use mydf[mydf == "some-character"] <- NA
.
However, in many cases that results in a
data.frame
where variables which should be numeric
end up as characters or factors if the NA string was a
character to begin with. This function is a convenience
wrapper around type.convert
to address such
problems.
1 2 |
mydf |
A |
NAStrings |
The values which have been used to
represent |
fixed |
Logical. Is the |
overwrite |
Logical. Should the current object be
overwritten? Defaults to |
Ananda Mahto
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.