I´m not sure why in rmarkdown the read.xlsx
doesn't recognize the name "Generación Renovable"
in the sheet =
argument.
I changed the name for the sheet index and it worked, rmarkdown knited my code.
Just to clarify I share the line with the read.xlsx
function with the change.
ernc <- read.xlsx(xlsxFile = path,
sheet = 4, # here goes the sheet index
rows = 5:54,
fillMergedCells = TRUE,
colNames = TRUE, detectDates = T)
I think it's because the sheet name is in spanish with the special character ´
so I tried passing options(encoding = "UTF-8")
also with double ""
but nothing worked until I change the sheet name for it´s index.
I hope that someone can tell me how to pass argument sheet =
with the name with special characters, just to know.
And I hope this helps to someone else.