DWQA QuestionsCategory: R LanguageWhat are the differences between t.test() and t.data.frame()? When do you use these two functions?
Editor Staff asked 9 months ago

What are the differences between t.test() and t.data.frame()? When do you use these two
functions?

1 Answers
Editor Staff answered 9 months ago

Due to the naming scheme of S3’s generic class, both functions are similar to one another.
However, they are not related to each other.
t.test() performs t-test and is generic in nature.
t.data.frame() is called by the generic t() for transposing the input data.
As a result of S3 dispatch rules, t.test() along with t() would get called when the latter is
applied to the class “test”