From 53aa1a24889bab414dbd103b8a3b4658aada59ed Mon Sep 17 00:00:00 2001 From: Virnaliz Cruz <40121477+garezana@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:35:32 -0400 Subject: [PATCH] Update Functions-writing-tidyverse-functions-R.md Adding language to the instructions to include site in the data frame as it is needed for the third exercise. --- exercises/Functions-writing-tidyverse-functions-R.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/Functions-writing-tidyverse-functions-R.md b/exercises/Functions-writing-tidyverse-functions-R.md index d5e17cc49..921807d5a 100644 --- a/exercises/Functions-writing-tidyverse-functions-R.md +++ b/exercises/Functions-writing-tidyverse-functions-R.md @@ -5,7 +5,7 @@ title: Writing Tidyverse Functions language: R --- -1\. Copy the following vectors into R and combine them into a data frame named `count_data` with columns named `state`, `count`, and `area`. +1\. Copy the following vectors into R and combine them into a data frame named `count_data` with columns named `state`, `count`, `area`, and `site`. ```r state_vector <- c("FL", "FL", "FL", "FL", "GA", "GA", "GA", "GA", "SC", "SC", "SC", "SC") @@ -16,4 +16,4 @@ area_vector <- c(3, 5, 1.9, 2.7, 2, 2.6, 6.2, 4.5, 8, 4, 1, 3) 2\. Write a function takes takes two arguments: 1) a data frame with a `count` column and an `area` column; and 2) a column in that data frame to color the points by. Have the function make a plot with `area` on the x-axis and `count` on the y-axis and the points colored by the column you provided as an argument. Set the size of the points to 3. Use the function to make a scatter plot of count as a function of area for the `count_data` data frame with the points colored by the `state` column. -3\. Use the function from (2) to make a scatter plot of count as a function of area for the `count_data` data frame with the points colored by the `site` column. \ No newline at end of file +3\. Use the function from (2) to make a scatter plot of count as a function of area for the `count_data` data frame with the points colored by the `site` column.