as.mixeddata: Convert a vector of values to IAI mixed data format

View source: R/utils.R

as.mixeddataR Documentation

Convert a vector of values to IAI mixed data format

Description

Julia Equivalent: IAI.make_mixed_data

Usage

as.mixeddata(values, categorical_levels, ordinal_levels = c())

Arguments

values

The vector of values to convert

categorical_levels

The values in values to treat as categoric levels

ordinal_levels

(optional) The values in values to treat as ordinal levels, in the order supplied

Examples

## Not run: 
df <- iris
set.seed(1)
df$mixed <- rnorm(150)
df$mixed[1:5] <- NA  # Insert some missing values
df$mixed[6:10] <- "Not graded"
df$mixed <- iai::as.mixeddata(df$mixed, c("Not graded"))

## End(Not run)

iai documentation built on Oct. 19, 2024, 1:07 a.m.