Re: [R] readxl question

2020-08-27 Thread Ulrik Stervbo via R-help
concatenating them together in one step seems to be the most efficient way. One probably could design such function, but time spent on the function performing the task only once is probably bigger than performing 250*3 reads. I see inefficiency in writing each column into separate text file and cop

Re: [R] readxl question

2020-08-27 Thread Ulrik Stervbo via R-help
design such function, but time spent on the function performing the task only once is probably bigger than performing 250*3 reads. I see inefficiency in writing each column into separate text file and coppying it back to Excel file. Cheers Petr -Original Message- From: Upton

Re: [R] readxl question

2020-08-26 Thread PIKAL Petr
t; To: PIKAL Petr ; Thomas Subia > Cc: r-help@r-project.org > Subject: RE: [R] readxl question > > From your example, it appears you are reading in the same excel file for > each function to get a value. I would look at creating a function that > extracts what you need from each

Re: [R] readxl question

2020-08-26 Thread Upton, Stephen (Steve) (CIV)
Center for Data Farming SEED Center website: https://harvest.nps.edu -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of PIKAL Petr Sent: Wednesday, August 26, 2020 3:50 AM To: Thomas Subia Cc: r-help@r-project.org Subject: Re: [R] readxl question NPS

Re: [R] readxl question

2020-08-26 Thread PIKAL Petr
now "result.xls" is directly readable with Excel Cheers Petr > > -Original Message- > From: R-help On Behalf Of Thomas Subia via > R-help > Sent: Saturday, August 22, 2020 6:25 AM > To: r-help@r-project.org > Subject: [R] readxl question > > Collea

[R] readxl question

2020-08-21 Thread Thomas Subia via R-help
Colleagues, I have 250 Excel files in a directory. Each of those files has the same layout. The problem is that the data in each Excel data is not in rectangular form. I've been using readxl to extract the data which I need. Each of my metrics are stored in a particular cell. For each metric,

[R] readxl question

2020-08-21 Thread Thomas Subia via R-help
Colleagues, I have 250 Excel files in a directory. Each of those files has the same layout. The problem is that the data in each Excel data is not in rectangular form. I've been using readxl to extract the data which I need. Each of my metrics are stored in a particular cell. For each metric,

Re: [R] Readxl Question

2019-12-20 Thread Jim Lemon
Hi Thomas, Perhaps this is what you are seeking: my_read_excel<-function(filename) { serials<-read_excel(filename,sheet="Flow Data",range=("c6")) flow.data<-read_excel(filename,sheet="Flow Data",range=("c22:c70")) dates<-read_excel(filename,sheet="Flow Data",range=("h14"))

[R] Readxl Question

2019-12-20 Thread Thomas Subia
Colleagues, I am using readxl to extract a serial number and its associated data using the following code. library(readxl) files <- list.files(pattern="*.xls", full.names = FALSE) serials <- lapply(files, read_excel, sheet="Flow Data", range=("c6")) flow.datum <- lapply(files, read_excel,

Re: [R] readxl question

2019-12-05 Thread Ivan Krylov
On Thu, 5 Dec 2019 15:39:56 + Thomas Subia wrote: > date <- lapply(files, read_excel, sheet="Sheet1", range=("B5")) > date_df <- as.data.frame(date) > trans_date <-t(date_df) > mydates <- list(trans_date) This feels a bit excessive for what looks like a one-dimensional string vector. Why is

[R] readxl question

2019-12-05 Thread Thomas Subia
Colleagues, I'm trying to extract a cell from all Excel files in a directory. library(readxl) files <- list.files(pattern="*.xls", full.names = FALSE) date <- lapply(files, read_excel, sheet="Sheet1", range=("B5")) date_df <- as.data.frame(date) trans_date <-t(date_df) mydates <-