Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Lab 2 Author: Date: Remember to change the author: field on this Rmd file to your own name. Loading the neccessary libraries: [ ]: library(tidyverse)
Lab 2 Author: Date: Remember to change the author: field on this Rmd file to your own name. Loading the neccessary libraries: [ ]: library(tidyverse) 1. Changing the author field and file name. (a) Change the author: field on the Rmd document from Your Name Here to your own name. (b) Rename this file to "lab02_YourHameHere.ipynb", where YourNameHere is changed to your own name. 2. Data practice In class we imported the survey data using the read.table() function. (Note: on Homework 1 you'll be asked to use the read.csv() function instead.) This is the code we used: [ ]: survey in ----> 1 survey 2 sum(survey( [["Program"]]= "PPM")) NameError: name 'survey' is not defined (b) What % of survey respondents are from PPM? [ ]: #Edit here 3. Index practice (a) Use $ notation to pull the Operating System column from the survey data []: #Edit here (b) Do the same thing with [] notation, referring to Operating System by name [ ]: #Edit here (c) Repeat part (b), this time referring to Operating System by column number [ ]: #Edit here (d) Repeat part (b), this time using the select() function. [ ]: #Edit here (e) Use filter() and select() together to get the Program and Rexperience of every student who watched at least 10 hours of TV last week. [ ]: #Edit here 4. Optional practice Try re-running as much of the lecture code as you have time for, taking time to understand what is happening in each line of code. Tip: Instead of copying and pasting code, practice typing it yourself. This will help you to learn the syntax. [ ]: #Edit here Lab 2 Author: Date: Remember to change the author: field on this Rmd file to your own name. Loading the neccessary libraries: [ ]: library(tidyverse) 1. Changing the author field and file name. (a) Change the author: field on the Rmd document from Your Name Here to your own name. (b) Rename this file to "lab02_YourHameHere.ipynb", where YourNameHere is changed to your own name. 2. Data practice In class we imported the survey data using the read.table() function. (Note: on Homework 1 you'll be asked to use the read.csv() function instead.) This is the code we used: [ ]: survey in ----> 1 survey 2 sum(survey( [["Program"]]= "PPM")) NameError: name 'survey' is not defined (b) What % of survey respondents are from PPM? [ ]: #Edit here 3. Index practice (a) Use $ notation to pull the Operating System column from the survey data []: #Edit here (b) Do the same thing with [] notation, referring to Operating System by name [ ]: #Edit here (c) Repeat part (b), this time referring to Operating System by column number [ ]: #Edit here (d) Repeat part (b), this time using the select() function. [ ]: #Edit here (e) Use filter() and select() together to get the Program and Rexperience of every student who watched at least 10 hours of TV last week. [ ]: #Edit here 4. Optional practice Try re-running as much of the lecture code as you have time for, taking time to understand what is happening in each line of code. Tip: Instead of copying and pasting code, practice typing it yourself. This will help you to learn the syntax. [ ]: #Edit here
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started