Question: The studentdata.txt uploaded in eLC. This data was collected based on sheet of questions answered by a large number of students in introductory statistics classes.

The studentdata.txt uploaded in eLC. This data was collected based on sheet of questions answered by a large number of students in introductory statistics classes. The variable information is given below:

Student: student number Height: height in inches

Gender: gender Shoes: number of pairs of shoes owned

Number: number chosen between 1 and 10

Dvds: name of movie dvds owned

ToSleep: time the person went to sleep the previous night (hours past midnight)

WakeUp: time the person woke up the next morning

Haircut: cost of last haircut including tip

Job: number of hours working on a job per week

Drink: usual drink at suppertime among milk, water, and pop

1. Download this data set from eLC and import it as a data frame and store it as studentdata. Print the first 10 observations of studentdata.

2. Write an R code to determine which values are missing values for the variable Height and remove the missing values from the variable Height and calculate the mean height of the students.

3.Write an R code to create a new column and call it hours.of.sleep from the dataframe studentdata by calculating the number of hours the students slept last night. Also, write an R code to find the average number of hours students slept last night.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!