treatment =gl(2,50, labels =c( "Treatment", "Control" ))) If you want to print out "mean" of m.example\$age by m.example

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

treatment =gl(2,50, labels =c( "Treatment", "Control" ))) If you want to print out "mean" of m.example\$age by m.example

Post by answerhappygod »

Treatment Gl 2 50 Labels C Treatment Control If You Want To Print Out Mean Of M Example Age By M Example 1
Treatment Gl 2 50 Labels C Treatment Control If You Want To Print Out Mean Of M Example Age By M Example 1 (47.67 KiB) Viewed 30 times
treatment =gl(2,50, labels =c( "Treatment", "Control" ))) If you want to print out "mean" of m.example\$age by m.example\$treatment, which function in the following would be the correct one for it? HINT: run ?sapply and ? tapply to check syntax of these functions. The outcome results will look like this: Treatment Control 64.2811660.01872 sapply(m.example\$age, m.example\$treatment, mean) tapply(m.example\$age, m.example\$treatment, mean) sapply(m.example\$age, mean) tapply(m.example\$age, mean)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply