Hi community,
Im try to load this data in Rmarkdown but show this error. Never I has see it .
But when I load in normal script is well.
Sheet1
ACCESION,DECLATITUDE,DECLATITUDE_parsed,DECLATITUDE_fix,DECLONGITUDE,DECLONGITUDE_parsed,DECLONGITUDE_fix,ORIGCTY,ORIGCTY_check,ORIGCTY_distance
COL 1581,6,5833,6,58330011,,-73,2,-73,19999695,,,COL
COL...
library(readxl)
accesio <- read_excel("D:\\OneDrive - CGIAR\\Documents\\R\\Mapas\\Revision Coordenadas_Frijol\\Accesiones_MAL_coordenadas.xlsx", sheet = 'CASSAVA2')
Im try with library(xlsx)
library(xlsx)
accesion<- read.xlsx("D:\\OneDrive - CGIAR\\Documents\\R\\Mapas\\Revision Coordenadas_Frijol\\Accesiones_MAL_coordenadas.xlsx", sheetIndex = 'CASSAVA2', header=TRUE)
#show this Error
# Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
# java.lang.OutOfMemoryError: GC overhead limit exceeded
Some ideas?
1 Like
FJCC
December 1, 2022, 5:08pm
2
The column types guessed by readxl seem to be off. One problem is that columns D and G seem to use . as the decimal separator while the other numeric columns use , as the decimal separator.
You could try forcing the column types using the col_types argument, like this:
accesio <- read_excel("~/R/Play/casava.xlsx", sheet = 1,
col_types = c("text","numeric","numeric","numeric",
"numeric","numeric","numeric","text",
"text","numeric"))
You will still get warnings about the "text" in columns D and G being coerced to numeric.
1 Like
Was the solution, I dont have the rule when load the data set the col_types
but in the next works Im put more attention in this.
Tnks.
FJCC
December 1, 2022, 9:37pm
4
Yes, that was very strange behavior by readxl::read_excel(). I am very surprised it guessed that some columns were of the type logical . I expect that most of the time its guesses are better than on this file.
1 Like
system
Closed
December 8, 2022, 9:38pm
5
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.