Portal Data Manipulation (dplyr)
If the file
surveys.csv is not already in your working directory then download a copy.
Load the file into R using
Do not use pipes for this exercise.
select()to create a new data frame with just the
species_idcolumns in that order.
!is.na()to create a new data frame with the
species_id, and weight in kilograms of each individual, with no null weights. The weight in the table is given in grams so you will need to create a new column for weight in kilograms by dividing the weight column by 1000.
- Use the
filter()function to get all of the rows in the data frame for the species ID