delete_response: Delete the response from a terms object

Description Usage Arguments Details Value Examples

View source: R/delete-response.R

Description

delete_response() is exactly the same as delete.response(), except that it fixes a long standing bug by also removing the part of the "dataClasses" attribute corresponding to the response, if it exists.

Usage

1

Arguments

terms

A terms object.

Details

The bug is described here:

https://r.789695.n4.nabble.com/delete-response-leaves-response-in-attribute-dataClasses-td4266902.html

Value

terms with the response sections removed.

Examples

1
2
3
4
5
framed <- model_frame(Species ~ Sepal.Width, iris)

attr(delete.response(framed$terms), "dataClasses")

attr(delete_response(framed$terms), "dataClasses")

DavisVaughan/hardhat documentation built on Oct. 5, 2021, 9:53 a.m.