Perhaps the discussion at this link will help ... (see especially the second answer).
http://stackoverflow.com/questions/7963393/out-of-memory-error-java-when-using-r-and-xlconnect-package Jean On Mon, Nov 4, 2013 at 8:26 AM, Baro <babak...@gmail.com> wrote: > > thanks alot, but now I have another problem: my Excel file is very big and > I get this error, which says: > > Error: OutOfMemoryError (Java): Java heap space > > Is there any way to read each value one by one and save them in an array? > > > On Mon, Nov 4, 2013 at 6:13 AM, Adams, Jean <jvad...@usgs.gov> wrote: > >> You can use the XLConnect package to read in a range of rows and columns, >> then define a function to subset the odd rows. For example, >> >> library(XLConnect) >> wb <- loadWorkbook("C:/temp/MyData.xls") >> dat <- readWorksheet(wb, sheet=getSheets(wb)[1], startRow=1, endRow=139, >> startCol=5, endCol=5) >> dat <- readWorksheet(wb, sheet=getSheets(wb)[1], startRow=1, endRow=79, >> startCol=5, endCol=5) >> odds <- function(x) x[seq(1, length(x), 2)] >> odds(unlist(dat)) >> >> Jean >> >> >> >> On Mon, Nov 4, 2013 at 7:47 AM, Baro <babak...@gmail.com> wrote: >> >>> Hi experts, >>> >>> I want to read data from an excel data like this: >>> >>> for the fifth column, from first row until 140 but only 1,3,5,7,.....139 >>> (only 70 values), >>> >>> How can I do it in R? >>> >>> thanks >>> >>> [[alternative HTML version deleted]] >>> >>> ______________________________________________ >>> 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. >>> >> >> > [[alternative HTML version deleted]] ______________________________________________ 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.