Excel
install the gdata library
install.packages("gdata")
load gdata library
library("gdata")
show documentation for reading Excel with foreign library
help(read.xls)
read first worksheet of Excel file into variable excelData
excelData <- read.xls("Desktop/data.xlsx")
view excelData
View(excelData)
SPSS data
load the built-in foreign library
library(foreign)
show documentation for reading SPSS with foreign library
help(read.spss)
load SPSS file into SPSSdata variable
SPSSdata = read.spss("Downloads/Robbery Incident.sav", to.data.frame=TRUE)
view SPSSdata
View(SPSSdata)
CSV data from web
show documentation for reading table data with the built-in read.csv function
help(read.csv)
load online csv file into webCSV variable
lets find a CSV file online together and copy the URL to the command below
webCSV <- read.csv("https://raw.githubusercontent.com/BobAdamsEE/SouthParkData/master/Season-11.csv")
view webCSV
View(webCSV)