HDS 2.1-2.2

Author

Alex Sevre

Loading R Packages

To begin, copy these two lines (without the number sign) to the console and run them, one at a time:

#install.packages("devtools")
#install.packages("devtools")

This will install the **** package (be patient). You will also need to install the tidyverse and nycflights23 packages the ordinary way (again, in the console, without the #):

#install.packages("tidyverse")
#install.packages("nycflights23")

Now you can load the packages you just installed. Insert the code for loading them here:

library(nycflights23)
library(hellodatascience)
library(devtools)
library(tidyverse)

Data Frames

Read Section 2.1 of Hello Data Science. In that section, you found that the planets data has 8 rows and 7 columns. Note that I didn’t type the number of rows or columns; R calculated them and inserted them into my text. This is important because if the data changes (someone adds a row for Pluto, for example), I don’t have to change my text.

The flights data in the nycflights23 package gives on-time data for all flights scheduled to depart from one of the three New York City airports in 2023. Type ?flights in the console to see the help page. Write a sentence (like the one in the previous paragraph) that describes the number of rows and columns in the flights dataset by mixing R code into your sentence: My console shows no data as typing in data flights and library flights doesn’t show anything I have installed all four of the things said to do so and it still doesn’t show me anything but tidyverse

Getting to Know Data

Read Section 2.2 of Hello Data Science. Print the first few rows of the flights data (you certainly don’t want to print them all!):

#does not show up

Use the glimpse function to get to know the variables in the flights data:

#no data present

Describe how these two functions are similar and how they differ: unknown the line for downloading hello data science was lost and I cannot find a way to refind it