Learn R Programming

imputeGeneric (version 0.1.0)

order_cols: Order column indices

Description

Order the indices of the columns of ds for imputation.

Usage

order_cols(ds, order_option, M = is.na(ds))

Arguments

ds

A data frame

order_option

This option defines the ordering of the indices. Possible choices are "lowest_md_first", "highest_md_first", "increasing_index", "decreasing_index".

M

Missing data indicator matrix

Value

The ordered column indices of ds as a vector.

Examples

Run this code
# NOT RUN {
ds <- data.frame(X = c(NA, NA, NA, 4), Y = rep(2, 4), Z = c(1, NA, NA, 4))
order_cols(ds, "highest_md_first")
# }

Run the code above in your browser using DataLab