num2factor: Convert a numeric column in a data.frame to a factor

View source: R/expectedPlot.R

num2factorR Documentation

Convert a numeric column in a data.frame to a factor

Description

Convert a numeric column in a data.frame to a factor

Usage

num2factor(data, call, name, no = 3)

Arguments

data

A data.frame

call

a function call

name

character Name of numeric column

no

numeric

Value

A data.frame

Examples

num2factor(anderson,name="logWBC")
library(survival)
fit=coxph(Surv(time,status)~logWBC+rx,data=anderson)
num2factor(anderson,call=fit$call,name="logWBC",no=2)

autoReg documentation built on Nov. 14, 2023, 9:07 a.m.