Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

factor_ext

Create an extended factor


Description

Create an extended factor

Usage

factor_ext(x, values, levels, drop = FALSE)

Arguments

x

The object to convert to an factor_ext

values

The values used for the levels; This is were factor_ext is different from a factor, as values for levels do not have to be consecutive or start at 1.

levels

The levels of the object; character string

drop

Should non-occurring levels be dropped

Details

An extended version of a regular factor variable. Instead of the levels having values from 1 to n where n is the number of levels, any integer value can be used for any level (including 64bit integers). If all values are in the range of a regular 32-bit integer, it is coerced to int. Automatic coercion of extended factors to factors in H5ToR_Post for enums only works for 32-bit integer base types. In this page this is heavily used, as constants in HDF5 can be arbitrary integer values.

Value

An object of S3 class factor_ext

Author(s)

Holger Hoefling


hdf5r

Interface to the 'HDF5' Binary Data Format

v1.3.3
Apache License 2.0 | file LICENSE
Authors
Holger Hoefling [aut, cre], Mario Annau [aut], Novartis Institute for BioMedical Research (NIBR) [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.