Hi again, I need to read below xlsx file correctly (available here: http://snk.to/f-ch3exae5), and used following code (say, file is saved in F: drive)> library(gdata) > read.xls("f:/Book1.xlsx", 1, header = F)V1 1 -0.419547704894512 2 -[$¥-411]0.42 However please notice that, in my original excel file the cells F4 and F7 have essentially the same values. Therefore I should get -0.419547704894512, for either cases above. Any idea on how to achieve that, without opening the xlsx file manually and then formatting the cell before reading it in R? Thanks for your help [[alternative HTML version deleted]]
Hello, Cell F7 has a formula, =F4, and when I open the file in excel, I get -?0.42, which shouldn't read properly in R. The problem seems to be in the file, not in read.xls. Hope this helps, Rui Barradas Em 24-01-2014 19:22, Christofer Bogaso escreveu:> Hi again, > > I need to read below xlsx file correctly (available here: > http://snk.to/f-ch3exae5), and used following code (say, file is saved in > F: drive) > > >> library(gdata) >> read.xls("f:/Book1.xlsx", 1, header = F) > V1 > 1 -0.419547704894512 > 2 -[$??-411]0.42 > > > However please notice that, in my original excel file the cells F4 and F7 > have essentially the same values. Therefore I should get > -0.419547704894512, for either cases above. > > Any idea on how to achieve that, without opening the xlsx file manually and > then formatting the cell before reading it in R? > > Thanks for your help > > [[alternative HTML version deleted]] > > > > ______________________________________________ > R-help at 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. >
Hi, I am getting this: read.xls("Book1.xlsx",1,header=F) #????????? V1 #1 -0.4195477 #2 -0.4195477 sessionInfo() R version 3.0.2 (2013-09-25) Platform: x86_64-unknown-linux-gnu (64-bit) attached base packages: [1] stats???? graphics? grDevices utils???? datasets? methods?? base???? other attached packages: [1] gdata_2.13.2?? stringr_0.6.2? reshape2_1.2.2 A.K. On Friday, January 24, 2014 4:11 PM, Christofer Bogaso <bogaso.christofer at gmail.com> wrote: Hi again, I need to read below xlsx file correctly (available here: http://snk.to/f-ch3exae5), and used following code (say, file is saved in F: drive)> library(gdata) > read.xls("f:/Book1.xlsx", 1, header = F)? ? ? ? ? ? ? ? ? V1 1 -0.419547704894512 2? ? -[$?-411]0.42 However please notice that, in my original excel file the cells F4 and F7 have essentially the same values. Therefore I should get -0.419547704894512, for either cases above. Any idea on how to achieve that, without opening the xlsx file manually and then formatting the cell before reading it in R? Thanks for your help ??? [[alternative HTML version deleted]] ______________________________________________ R-help at 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.