Page 1 of 1

In an R Studio markdown file: Q6: From the "gapminder," dataset, select the columns, "country", "year", and "lifeExp" an

Posted: Tue Jul 05, 2022 10:27 am
by answerhappygod
In an R Studio markdown file:
Q6: From the "gapminder," dataset, select the columns,"country", "year", and "lifeExp" and save the subset of gapminderdata as "data." Tidy this dataset using the pipe operator such thatthere is only one country in each row and many years in the columnsand life expectancy as a value for year columns. Save this new tidydata as "wide_data" (should contain 13 columns in the end)
Q7: Remove duplicates based on the"year" column from the "data" dataset and assign the variable"drop_dup". Next, plot a line chart withthe variable "year" and "lifeExp", also rename the x-axisto"Years", the y-axis to "Life Expectancy" and title named "LifeExpectancy Over Years", and change the line color to red.