complete {bnstruct} | R Documentation

## Subset a `BNDataset` to get only complete cases.

### Description

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.

### Usage

    complete(x, complete.vars = seq_len(num.variables(x)))

    ## S4 method for signature 'BNDataset'
    complete(x,
      complete.vars = seq_len(num.variables(x)))

### Arguments

`x` | a `BNDataset`.
`complete.vars` | vector containing the indices of the variables to be considered for the subsetting; variables not included in the vector can still contain `NA`s.

### Details

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.

### Value

a copy of the original `BNDataset` containing only complete observations.

[Package bnstruct version 1.0.6 Index]