Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

R Programming After importing an excel file, how would I calculate the standard deviation of multiple columns. So, for example, if I had an excel

R Programming

After importing an excel file, how would I calculate the standard deviation of multiple columns. So, for example, if I had an excel file and my columns pertained to different classes and their exams on score, such as Class 1, Class 2, Class 3, Class 4, Class 5, etc.. and there were 50 students thus meaning 50 scores for each class. How would I calculate the total standard deviation in R Programming for Columns (Class 1 to Class 5)? I did this in R Programming but keep getting the standard deviation for each individual column but I want to total combined standard deviation of all the columns. For example, in this example, I do not want the standard deviations for Class 1, Class 2, Class 3, etc. but the standard deviations for Class 1 to Class 5 combined.

In R Programming, for my program I used this function which provides me the standard deviation for each column but I want the standard deviation for Columns Class1 to Class 5.

This is what I used sapply(data[,3:11], sd,na.rm=TRUE)

This gives me the standard deviation for each separate column. What would I add or change to get the total standard deviation for columns 3 to 11. I just want one standard deviation for all those columns together.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Complex Variables And Applications

Authors: James Brown, Ruel Churchill

9th Edition

0073530859, 9780073530857

More Books

Students also viewed these Mathematics questions