Description Usage Arguments Value Author(s) Examples
This function will remove metadata variables with only one level and /or remove variables with missing data or neither numeric nor factor/character (NNF).
1 2 |
meta |
the metadata table to be analyzed. |
excl.na |
logical. Whether or not remove variables that contain missing data. |
excl.NNF |
logical. Whether or not remove variables that neither are numeric nor factor/character. |
exclude |
optional. If is |
The value returned by this function is a data frame with the
following metadata variables being removed: 1) with missing
data; 2) NNF if excl.NNF
is TRUE
; and 3) in the
exclude
list.
Wen Chen
1 2 3 4 5 6 7 8 9 10 11 | data(meta)
## Not run:
# add a new column with NA
meta.nw <- meta
meta.nw$na <- c(rep(NA, nrow(meta.nw)-3), c(1, 3, 5))
meta.nw$nf <- rep("Canada", nrow(meta.nw))
meta.fil <- filter.META(meta.nw)
meta.fil <- filter.META(meta.nw, excl.na=FALSE, excl.NNF=FALSE,
exclude=c("Province", "Latitude"))
## End(Not run)
|
Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-4
Loading required package: ggplot2
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
[1] "A total of 3 columns are removed: na, nf, Harvestdate"
[1] "columns in exclude list: "
[1] "column# with missing data: 11"
[1] "columns# with one level: 12"
[1] "column# that are not numeric or factor: 6"
Warning message:
In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
[1] "A total of 4 columns are removed: Province, Latitude, nf, Harvestdate"
[1] "columns in exclude list: 8, 9"
[1] "column# with missing data: "
[1] "columns# with one level: 12"
[1] "column# that are not numeric or factor: 6"
Warning message:
In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.