complete {bnstruct} | R Documentation |
BNDataset
to get only complete cases.Given a BNDataset
, return a copy of the original object where
the raw.data
consists only in the observations that do not contain missing values.
complete(x, complete.vars = seq_len(num.variables(x))) ## S4 method for signature 'BNDataset' complete(x, complete.vars = seq_len(num.variables(x)))
x |
a |
complete.vars |
vector containing the indices of the variables to be considered
for the subsetting; variables not included in the vector can still contain |
Non-missingness can be required on a subset of variables (by default, on all variables).
If present, imputed data and bootstrap samples are eliminated from the
new BNDataset
, as using this method *after* using impute
or bootstrap
, there may likely be a loss of correspondence between
the subsetted raw.data
and the previously generated imputed.data
and bootstrap
samples.
a copy of the original BNDataset
containing only complete observations.