Learn R Programming

MachineShop (version 1.1.0)

response: Extract Response Variable

Description

Extract the response variable from an object.

Usage

response(object, ...)

# S3 method for formula response(object, data, ...)

# S3 method for recipe response(object, data, ...)

Arguments

object

object containing response variable values.

...

arguments passed to other methods.

data

data.frame containing the values of a response variable defined in a formula.

See Also

recipe

Examples

Run this code
# NOT RUN {
## Survival response example
library(survival)
library(MASS)

fo <- Surv(time, status != 2) ~ sex + age + year + thickness + ulcer
response(fo, data = Melanoma)

# }

Run the code above in your browser using DataLab