addTypedDataSet: Add types for a dataset.

View source: R/dataset.R

addTypedDataSetR Documentation

Add types for a dataset.

Description

Add types for a dataset.

Usage

addTypedDataSet(name, lst)

Arguments

name

The path to the dataset on disk.

lst

A list of column names and their types.

Details

Note that this has already been done for debug.csv and test.csv. This is an alternative interface to specify types in jaspTools. The usual way is to specify a key in the options object with the types. For example, if options[["variables"]] == c("contNormal", "facFive", "contBinom") then one could indicate the types by writing options[["variables.types"]] == c("scale", "ordinal", "nominal"). With addTypedDataSet this becomes:

addTypedDataSet(
 "test.csv",
 list(
   contNormal   = "scale",
   facFive      = "ordinal",
   contBinom    = "nominal"
 )
)

the main benefit is that this only needs to be done once, instead of being repeated for each options object.

Examples

addTypedDataSet(
 "test.csv",
 list(
   V1           = "scale",
   contNormal   = "scale",
   contGamma    = "scale",
   contBinom    = "nominal"
 )
)

jasp-stats/JASPTools documentation built on Oct. 17, 2024, 6:53 p.m.