Question: CODING IN R (RSTUDIO) This is for coding in R. You will lose 10% of the points if your code can not be run as
CODING IN R (RSTUDIO)
This is for coding in R. You will lose 10% of the points if your code can not be run as a whole script . There cannot be than 80 characters in a line.


Please show correct indentation in RStudio.
Lab assignment 1/2 . [1.(10 points)] Create the below list ## $name ## [1] "Alex" "Bob" "Claire" "Denise" ## ## $female ## [1] FALSE FALSE TRUE TRUE ## ## $age ## [1] 20 25 30 35 [2. (10 points)] Get the name "Bob" from the list by accessing it from the location of name vector - Hint: Get the name vector from the list and then get the second element in the vector - Note: You will not get any point if you get "Bob" directly from list you created. ## [1] "Bob" 40/41 Lab assignment 2/2 [3. (10 points)] Create the above data frame (don't forget the column/row names!) name female age ## row_1 Alex FALSE 20 ##row_2 Bob FALSE 25 ## row_3 Claire TRUE 30 ## row_4 Denise TRUE 35 [4. (10 points)] Obtain the mean of the age column from the data frame - Note: You will not get any point if you do not get the answer through the data.frame. ## [1] 27.5 . [5. (10 points)] Retrieve Claire's age from the data frame - Hint: Refer to slides on getting values from 'rows matching a condition'. - Note: You will not get any point if you do not get the answer through the data.frame. 41/41 ## [1] 30
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
