You can get that data from Intrinio in R as well. There is documentation, including how to actually make the API calls in R with examples, here. Here is an example of pulling Apple's income statement for Q1 2017- you just need to get your own API keys and add them to the code (it's free):
#Cleaning up the environment
rm(list=ls())
#Skip this installation if you already have httr installed. This package makes using APIs in R easier
install.packages("httr")
#Require the package so you can use it
require("httr")
#Skip this installation if you already have jsonlite installed. This package makes parsing JSON easy
install.packages("jsonlite")
#Require the package so you can use it
require("jsonlite")
#Create variables for your usename and password, get those at intrinio.com/login.
#Replace them here or the code won't run! They need to be in ""
username <- "Your_API_Username_Here"
password <- "Your_API_Password_Here"
#These variables will be pasted together to make our API call. You can replace the "stock" variable with any US ticker symbol
base <- "https://api.intrinio.com/"
endpoint <- "financials/standardized"
stock <- "identifier=AAPL"
statement <- "statement=income_statement"
fiscal_period <- "fiscal_period=Q1"
fiscal_year <- "fiscal_year=2017"
#Pasting them together to make the API call.
call1 <- paste(base,endpoint,"?",stock,"&", statement, "&", fiscal_period, "&", fiscal_year, sep="")
#This line of code uses the httr package's GET function to query Intrinio's API, passing your username and password as variables
get_prices <- GET(call1, authenticate(username,password, type = "basic"))
#The content function parses the API response to text. You can parse to other formats, but this format is the easiest to work with. Text is equivalent to JSON
get_prices_text <- content(get_prices, "text")
#This line of code uses the JSONlite function fromJSON to parse the JSON into a flat form. Flat means rows and coloumns instead of nested JSON
get_prices_json <- fromJSON(get_prices_text, flatten = TRUE)
#Converting the data to a dataframe
get_prices_df <- as.data.frame(get_prices_json)
The result is a dataframe that looks like this:
Now that you can get the statements via API (for free), you can go to town analyzing them.