Learn R Programming

useful (version 1.2.0)

build.y: build.y

Description

Build the y survival object for a glmnet model

Usage

build.y(formula, data)

Arguments

formula
A formula
data
A data.frame

Value

  • A surival object for the portion of the formula in Surv

Details

Given a formula and a data.frame build the y survival object

Examples

Run this code
require(ggplot2)
head(mpg)
head(build.y(hwy ~ class + cyl + year, data=mpg))

Run the code above in your browser using DataLab