Horje
read excel in r Code Example
read excel in r
#readxl Package
library(readxl)
##Read sheet One by One
read_excel("data.xlsx", sheet = 1,
          col_names = c("x", "y"), #Default col_names = T
          col_types = NULL, #Null means R will guess the type itself, 
           					#it can also take "text", "numeric", "date", "blank"
          skip = 0)

##All
lapply(excel_sheets("data.xlsx"), 
       read_excel,
       path = "data.xlsx")

##Getting Sheets name
excel_sheets("data.xlsx")

#gdata Package
##Default for xls file type only
##Require extra modules to read xlsx files
library(gdata)
read.xls("data.xls", sheet = 2)

### All sheet argument within this document could be also susbstituted with sheets' name




17

Related
vertical line in ggplot2 Code Example vertical line in ggplot2 Code Example
select all columns except one by name in r Code Example select all columns except one by name in r Code Example
drop columns by index r Code Example drop columns by index r Code Example
R rename singl edf column Code Example R rename singl edf column Code Example
number of rows by group in r Code Example number of rows by group in r Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11