reclass: reclass

View source: R/reclass.r

reclassR Documentation

reclass

Description

Adds a class to an x.

Usage

reclass(x, value)

reclass(x) <- value

Arguments

x

The x getting the new class

value

The new class

Details

Adds a class to an x by putting the new class at the front of the vector of classes for the x.

Value

The original x with the class containing value in addition to the previous class(es)

Author(s)

Jared P. Lander

Examples

theDF <- data.frame(A=1:10, B=1:10)
reclass(theDF) <- 'newclass'
class(theDF)
theDF <- reclass(theDF, 'another')
class(theDF)


useful documentation built on Oct. 24, 2023, 9:07 a.m.