filmov
tv
Read Excel File in R (Example) | xlsx, xls, read_excel, readxl, & openxlsx | Multiple Files & Sheets

Показать описание
R code of this video:
data(iris) # Load iris data to RStudio
head(iris) # Print first 6 rows of iris
library("xlsx") # Load xlsx R package to RStudio
setwd("C:/Users/Joach/Desktop/my directory") # Set working directory
sheetIndex = 1)
library("readxl") # Load readxl R package to RStudio
library("openxlsx") # Load openxlsx R package to RStudio
data(mtcars) # Load mtcars data to RStudio
head(mtcars) # Print first 6 rows of mtcars
append = TRUE, # Specify that data gets appended
sheetName = "mtcars")
sheetName = "mtcars")
all_file_names # Print list of xlsx files in directory
data_list <- lapply(all_file_names, read_excel) # Read multiple excel files
sheetIndex = 1)
Follow me on Social Media:
data(iris) # Load iris data to RStudio
head(iris) # Print first 6 rows of iris
library("xlsx") # Load xlsx R package to RStudio
setwd("C:/Users/Joach/Desktop/my directory") # Set working directory
sheetIndex = 1)
library("readxl") # Load readxl R package to RStudio
library("openxlsx") # Load openxlsx R package to RStudio
data(mtcars) # Load mtcars data to RStudio
head(mtcars) # Print first 6 rows of mtcars
append = TRUE, # Specify that data gets appended
sheetName = "mtcars")
sheetName = "mtcars")
all_file_names # Print list of xlsx files in directory
data_list <- lapply(all_file_names, read_excel) # Read multiple excel files
sheetIndex = 1)
Follow me on Social Media:
Комментарии