Classwork_03.pdf - PSY 3020 F19 – S Han Dataset ExerciseHours(pre-loaded in R Amount of exercise per week for students(and other variables 50

# Classwork_03.pdf - PSY 3020 F19 – S Han Dataset...

• 1

This preview shows page 1 out of 1 page.

PSY 3020, F19 S. Han [Classwork 03] 1 Dataset: ExerciseHours (pre-loaded in R) Amount of exercise per week for students (and other variables) 50 observations on the following 7 variables Year : Year in school (1=First year,..., 4=Senior) Gender : F or M Hand : Left (l) or Right (r) handed? Exercise : Hours of exercise per week TV : Hours of TV viewing per week Pulse : Resting pulse rate (beats per minute) Pierces : Number of body piercings 1. See the overall structure of the data frame 2. Get the first 6 rows of the variables Gender , Exercise , TV , and Pulse 3. Get the frequency table of Gender . a) How many female subjects are there? b) How many male subjects are there? 4. Arrange the data frame in descending order of Pulse and get the last 6 rows of the arranged data frame a) What ’s the pulse rate of the subject with the lowest pulse rate? 5. C onvert “1” s , “2” s, 3 s, and “ 4 ”s in Year into freshman ”s, “ sophomore ”s, “ junior s and senior s, and then save the converted variable as Year2 a) Get the frequency table of

#### You've reached the end of your free preview.

Want to read the whole page?

• Fall '18
• Joel Ellwanger

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern