Subscript an miVariable Object

DESCRIPTION:

Allows you to extract values in an miVariable object using subscripts.

USAGE:

x[i] 
x[i, j, ...] 
x[i, j, ..., drop=T] 

REQUIRED ARGUMENTS:

x
an miVariable object.

OPTIONAL ARGUMENTS:

i, j, ...
subscripts;
drop
logical flag, should dimensions of length 1 be dropped.

VALUE:

an miVariable object (even if there are no missing values).

DETAILS:

These functions extract multiple imputations along with the normal data.

To replace elements, or if a problem occurs when extracting elements, then use miEval to perform the subscripting, and as.miVariable to convert the result to an miVariable object.

SEE ALSO:

, , .

EXAMPLES:

x <- cholesterolImpExample[[3]] 
x 
x[8:12] 
x[c(1,1,1)]   # Duplicate row names 
x[15:16]      # no missing values, is still miVariable 
miTrim(x[15:16])# Converted to ordinary numeric 
dim(x) <- c(4,7) 
x 
x[1:2, ] 
# x[1, ] <- 5  # would fail, subscript replacement not supported 
miEval(x[1, ] <- 5)  # Do this instead; result is miList 
as.miVariable(x)    # Now as an miVariable.