Skip to content
Back to formatted view

Raw Message

Message-ID: <AM6PR02MB4423B827B283267F4B4ABD1E92859@AM6PR02MB4423.eurprd02.prod.outlook.com>
Date: 2021-02-18T14:44:24Z
From: Iago Giné Vázquez
Subject: A wish on t.test.formula values

Dear all,

In `?t.test`, **Value** section we can read: "data.name a character string giving the name(s) of the data."
But, for *formula* class:

t.test(mpg ~ am, data = mtcars, subset = cyl==4, na.action = "na.omit")$data.name
[1] "mpg by am"

I believe it would be desirable to have all the information on data, adding something like

DNAME <- paste(DNAME, paste(m[-c(grep("^(|formula)$", names(m), perl = TRUE))], collapse = "; "), sep = "; dataframe: ")

after the line

DNAME <- paste(names(mf), collapse = " by ")

to the S3 method for class `stats:::t.test.formula`, so we would get
[1] "mpg by am; data: mtcars; cyl == 4; na.omit"

Thank you for reading and stay safe.

Iago

	[[alternative HTML version deleted]]