nafracCalc | R Documentation |
Calculate the fraction (univariate case) or fractions (bivariate case) of missing values in the data or in each component of the data.
nafracCalc(y,drop=TRUE)
y |
A vector or a one or two column matrix of discrete data or a
list of such vectors or matrices, or a list of such lists
(an object of class |
drop |
Logical scalar. If |
If y
is not of class "multipleHmmDataSets"
,
then the returned value is a scalar (between 0 and 1) if the data
are univariate or a pair (2-vector) of such scalars if the data
are bivariate. The values are equal to the ratios of the total
count of missing values in the appropriate column to the total
number of observations.
If y
is of class "multipleHmmDataSets"
,
and if y
has length greater than 1 or drop
is
FALSE
, then the returned value is a list of such
scalars or 2-vectors, each corresponding to one of the data sets
constituting y
. If y
has length equal to 1 and
drop
is TRUE
, then the returned value is the same
as if codey were not of class "multipleHmmDataSets"
.
Rolf Turner
r.turner@auckland.ac.nz
rhmm()
misstify()
xxx <- with(SydColDisc,split(y,f=list(locn,depth))) nafracCalc(xxx) # 0.7185199
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.