Explore Financial Data in R

Now that we have the data file in our working directory, we can load it in our R session and start exploring it.

Use the following command to load the data into R.

> loandata = read.csv("loan_data_2017.csv",stringsAsFactors=FALSE)

The “stringsAsFactors = FALSE” parameter turns off the automatic conversion of character strings to factors.

Let's set the seed to 0 so that we can replicate the results.


Before we proceed with our analysis, we need to understand what’s contained in the dataset. We may also possibly want to remove unwanted data and transform some data to make it usable for analysis.

Data Summary

Let’s first analyse the structure of the data using str() or summary() function.

This content is for paid members only.

Join our membership for lifelong unlimited access to all our data science learning content and resources.