R: Calculate the percentage of missing morphometric data
how.many.missing
R Documentation
Calculate the percentage of missing morphometric data
Description
Calculates the percentage of morphometric data points that have been replaced with 'NA' by functions such as missing.data, byclade or obliterator from LOST. Used to verify the amount of missing data inputted into complete morphometric matrices.
Usage
how.many.missing(x)
Arguments
x
A n X m matrix of morphometric data with n specimens and m variables containing some percentage of missing data
Value
Returns the percentage (as a decimal) of missing data points present in x
Author(s)
J. Arbour and C. Brown
References
Brown, C., Arbour, J. and Jackson, D. 2012. Testing of the Effect of Missing Data Estimation and Distribution in Morphometric Multivariate Data Analyses. Systematic Biology 61(6):941-954.
See Also
missing.data
Examples
data(crocs)
## remove 30% of data points
croc.miss<-missing.data(crocs,0.3)
## should return 0.3
how.many.missing (croc.miss)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(LOST)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LOST/how.many.missing.Rd_%03d_medium.png", width=480, height=480)
> ### Name: how.many.missing
> ### Title: Calculate the percentage of missing morphometric data
> ### Aliases: how.many.missing
>
> ### ** Examples
>
> data(crocs)
>
> ## remove 30% of data points
> croc.miss<-missing.data(crocs,0.3)
>
> ## should return 0.3
> how.many.missing (croc.miss)
[1] 0.3000776
>
>
>
>
>
>
> dev.off()
null device
1
>