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...

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
Image of page 1

You've reached the end of your free preview.

Want to read the whole page?

  • Fall '18
  • Joel Ellwanger

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors