complete {bnstruct}R Documentation

Subset a BNDataset to get only complete cases.


Given a BNDataset, return a copy of the original object where the 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)))



a BNDataset.


vector containing the indices of the variables to be considered for the subsetting; variables not included in the vector can still contain NAs.


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 and the previously generated and bootstrap samples.


a copy of the original BNDataset containing only complete observations.

[Package bnstruct version 1.0.15 Index]