Saraswathi Analytics provides Visual Analytics Week 3 solution (Visual Analytics - 202051 - CRN140).
R Markdown - Getting Started
Follow the instructions in the book to create a new project. Give it a name and an author. Execute the 3 code snippets from the preface to bring all the packages into this new project then create a new R Markdown document as instructed by the book. Load the tidyverse and socviz libaries.
In order to execute code in an R Markdown object, the code must be enclosed by: {r}.....
Use R studio to complete the following:
- create a vector of the names of the members of your immediate family
- display it
- create a vector of numbers
- find the mean of the numbers in the vector you created
- assign the results of a function to an object
- display the object
- determine the class of the vector
- change the class of the vector to character
- show the new class
- show the titanic dataframe
- show the class of titanic
- convert the titanic dataframe to a tibble
- show the structure of various objects
- show the structure of the mpg dataframe (mpg is an example dataset showing mileage for cars of various models and with different numbers of cylinders)
- show the contents of the mpg dataframe
- create a scatterplot of the mpg dataset
- create an object called ‘url’ with the organ donation file in it
- create an object with the organ donation data, find the structure of that object, load the gapminder dataset (watch this video to learn more about gapminder)
- make a scatterplot of the gdpPercap and lifeexp
Submit an R Markdown document by Sunday at midnight with this work in it. Show the graphs not the code. comment on the submissions of two classmates.
Note:
- Only for knowledge gain and helping to the students(who are facing difficulties when solving to the Assessments/ Home works) with their course support.