The below snippets of code illustrate how to import data into R from several different formats. Import data in CSV format mydata = read.csv(“C:/R/MGFinance.csv”) #read csv file mydata Import data in JSON format install.packages(“jsonlite”) library(jsonlite) data
Continue reading »Month: June 2016
rvest: Web Scraping Using R
rvest is one of the standard libraries when it comes to web scraping using R. In the following example, we use R to import a sample table from this webpage using the aforementioned library. With the sample table below containing […]
Continue reading »Statistical Power Calculation Using R (power.t.test)
The statistical power of a test allows us to determine the minimum sample size that would be expected to yield significant results for a test. In R, this can be calculated by using the power.t.test command. We have already discussed […]
Continue reading »