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, sheet="Flow Data", range=("c22:c70")) dates <- lapply(files, read_excel, sheet="Flow Data", range=("h14")) Here each serial and date is associated with 49 data points in flow.datum. Now I write the serials, flow data and dates into a text file using: datesdf <- as.data.frame(dates) mydates <- list(datesdf) write.table(mydates,"dates.txt",sep="\t") serialdf <- as.data.frame(serials) myserials <- list(serialdf) write.table(myserials,"serials.txt",sep="\t") flowdf <-as.data.frame(flow.datum) myflow <- list(flowdf) write.table(myflow,"myflow.txt",sep=",") The problem with the dates.txt and the serials.txt is that they need to associated with its 49 corresponding values in myflow.txt. The objective is to create a text file having this format: Serial Date Flow I'm not sure how to do this. Any suggestions would be appreciated. Thomas Subia Statistician / Senior Quality Engineer ASQ CQE IMG Companies 225 Mountain Vista Parkway Livermore, CA 94551 T. (925) 273-1106 F. (925) 273-1111 E. tsu...@imgprecision.com Precision Manufacturing for Emerging Technologies imgprecision.com The contents of this message, together with any attachments, are intended only for the use of the individual or entity to which they are addressed and may contain information that is legally privileged, confidential and exempt from disclosure. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this message, or any attachment, is strictly prohibited. If you have received this message in error, please notify the original sender or IMG Companies, LLC at Tel: 925-273-1100 immediately by telephone or by return E-mail and delete this message, along with any attachments, from your computer. Thank you. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.