num2factor {autoReg}R 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)

[Package autoReg version 0.3.3 Index]