Length of an miVariable object.

DESCRIPTION:

Return or change the length of an miVariable object.

USAGE:

length(x) 
length(x) <- value 

REQUIRED ARGUMENTS:

x
an miVariable object.
value
an integer.

VALUE:

length(x) returns an integer.

Modifying the length results in an miVariable object with the new length.

DETAILS:

These are methods for the generic functions length and "length<-".

These functions extract or change the length of the Data slot of an miVariable object. If the object is shortened enough to omit values with imputations, then the whichNA and Imputations slots will be modified. If lengthened, then x is padded with NAs (without imputations).

SEE ALSO:

, , .

EXAMPLES:

x <- cholesterolImpExample[[3]] 
x 
length(x)       # 28 
length(x) <- 30 # padded with NA's without imputations 
x 
length(x) <- 5 
x               # Data and imputations are truncated