All Eyez On Data

R: Dataset included to test your skills (Part 1)

When you install R on you local machine or on your server it comes with datasets to which you can play around with and learn different techniques.

Example you have AirPassengers {datasets} which is "Monthly Airline Passenger Numbers 1949-1960"

Let's try it out together by starting up your Rstudio.

First get the dataset:


Then load the data to AP:

AP <- AirPassengers

When you have loaded your data it's always good to have a look at it to make sure that the data is loaded correctly and check is the values are as expected.

Start with viewing your data:


You could then check if you have missing values:


Is should now give this in return if you have no missing values:

#[1] 0

Get the summary:


Now let's try to plot something:

#Plot the raw data using the base plot function

plot(AP,xlab="Date", ylab = "Passenger numbers (1000's)",main="Air Passenger numbers from 1949 to 1961")

Data Plot AirPassengers This is part one of this test of working with a R dataset.