Questions tagged [readxl]

an R package that can be used to import Excel (.xls and .xlsx) files into R

The readxl package can be used to import Excel (.xls and .xlsx) files into R. It has no external dependencies (the libxls C library is embedded) and works on Windows, Mac, and Linux.

Resources

356 questions
0
votes
0 answers

Readxl function unable to detect the datatype and giving warnings after forced load

This is the my code. I have an xlsx file with multiple worksheets and I am trying to load the first worksheet. I used the RStudio Excel IDE to load the worksheet Rstudio Excel IDE Which generated the below code but it considered all the attributes…
cyborg
  • 431
  • 1
  • 6
  • 20
0
votes
2 answers

Renaming a variable number of dataframes from a single object in R

I am trying to understand how to write a loop in R to rename a variable number of data frames. If I run this code: library("readxl") path <- readxl_example("datasets.xls") MyObject<-lapply(excel_sheets(path), read_excel, path = path) I get an…
Lina Bird
  • 451
  • 1
  • 6
  • 11
0
votes
0 answers

R: Iterate through excel file content readxl

require("readxl") excelFile<-read_excel("C:/PathtoExcel.xlsx") I want to iterate through the excelFile so I get each column's value in each row in the excel sheet how do I do that? I want to do that for following problem: I have an excel sheet with…
hariszaman
  • 8,202
  • 2
  • 40
  • 59
0
votes
1 answer

Import data with format

I have a question about import multiple data(excel or csv). I know if I want to read multiple excel data(same column name) at the same time, the code is: library(readxl) file.list <- dir(path = "/path", pattern='\\.xlsx', full.names = T) df.list…
Peter Chen
  • 1,464
  • 3
  • 21
  • 48
0
votes
1 answer

How to convert untidy survey tables to dataframes in R

I often work with survey data at my job that comes in horribly formatted excel files that have been designed for readability and not for any data analysis. I'm looking for a way to clean the data in R and knock it into a dataframe format of…
Paul Campbell
  • 846
  • 7
  • 9
0
votes
1 answer

Missing column when using read_excel to read from .xls file

I am using the R version 3.3.2 and latest readxl package. I am using the read_excel from readxl package for reading the .xls and .xlsx files. In Rstudio server the readxl reads the .xls and .xlsx files correctly. After deploying the application on…
Abhinandan Satpute
  • 2,558
  • 6
  • 25
  • 43
0
votes
2 answers

How to import multi-file .xlsx data into single R dataframe without levels?

I'm trying to extract each company's data from some free NASDAQ 100 Twitter data sets available here. The ultimate goal, once constructed and curated, is to run some modeling experiments with the dataframe. The basic dataframe form I'm aiming for…
xq1515426
  • 89
  • 9
0
votes
0 answers

Can't import .xlsx into R using readxl

Here's my code: library(readxl) datasets <- system.file("C:/Users/tyeg/Documents/Gamma Counter Processing/Inflammation/Study Compilation Sheet2.xlsx", package = "readxl") read_excel(datasets) Here's the error I get: '' does not exist in current…
GT.
  • 764
  • 1
  • 8
  • 30
0
votes
1 answer

Detect a row that contain names

I need to detect if my first row of observations is a row of names. Always when I import the data are imported as character columns from the spreasheet (readxl package). By the structure of the data, a non-name row, always contain at least 8 numeric…
Cristóbal Alcázar
  • 1,153
  • 14
  • 26
0
votes
1 answer

read_excel recode number as na value

While importing data from an excel file using the read_excel function in the readxl package, I have tried specifying a number for the na argument but it does not recode the missing values. The data was entered with a numeric value as the missing…
Andrew Jackson
  • 823
  • 1
  • 11
  • 23
0
votes
2 answers

Removing all columns with a name on the fly

I'm using read_excel for speed and simplicity to import an Excel file. Unfortunately, there's as yet no capability of excluding selected columns which won't be needed from the data set; to save effort, I am naming such columns "x" with the col_names…
MichaelChirico
  • 33,841
  • 14
  • 113
  • 198
0
votes
1 answer

Import tabbed spreadsheet into list in R

My data exists as a tabbed spreadsheet, and I'm trying to write a script to import it. library(readxl) oput <- 0 tabnames <- excel_sheets("dataset.xlsx") for(x in seq_along(tabnames)){ assign(tabnames[x], read_excel("dataset.xlsx", sheet =…
Trent
  • 55
  • 1
  • 8
0
votes
0 answers

how to read Excel sheet's tab names in R?

How can one load an Excel file to R with all its tab names? I am using the readxl package currently for reading Excel but can't figure out how to save its tab names? E.g., abc = read_excel("Saudi Diapers.xlsx", 1, col_names = T) Here I have…
Ankit Bhatia
  • 99
  • 1
  • 1
  • 8
0
votes
0 answers

R readxl read_excel() and 1/1/1900 0:00

Using read_excel() from the readxl package to read in a spreadsheet that has a column of dates I see upon inspection numerous "1899-12-31 00:00:00 UTC". These correspond to the "1/1/1900 0:00" which I see from inside Excel. Should I be concerned…
Kerry
  • 411
  • 4
  • 13
-1
votes
1 answer

R Concatenate Columns from Excel file based on sheet name and Column's name

Hello Guys I have an excel file that has multiple sheetnames and these sheet names dont always have the same structure I wanna be able to read the excel file, read only some specifics sheets, select some specific columns and then create a…
R_Student
  • 624
  • 2
  • 14
1 2 3
23
24