On 08/01/2014 11:27 AM, Baro wrote:
Hi experts
I want to read an excel file in an R-script and send the inputs to another
script to more process
the first file for reading the data is (First.R):
wb <- loadWorkbook("adress")
dat <-readWorksheet(wb, sheet=getSheets(wb)[1], startRow=strow,
endRow=endrow, startCol=spalte, endCol=spalte,header=FALSE)
datalist<-dat[,1]
while(n<=length(datalist))
{
m<-strsplit(datalist[n],split=",")
m<-sapply(m,as.numeric)
m<-c(m)
input<-m
n<-n+30
}
and now, I want to use input in other R script for each loop (second.R),
how can I do that
You should be using functions for this. Write a function that loads
your workbook and does the processing above. Call that in a loop.
Duncan Murdoch
______________________________________________
R-help@r-project.org mailing list
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.