r - Error on XLConnect::readWorksheet function -


i have line of r code giving me error. line of code is:

var <- readworksheet(paste(dir.censo, arq.variaveis, sep="/"), sheet = sheet.variaveis) 

where dir.censo holds directory path of excel workbook , arq.variaveis name of variable holding file name. naturally sheet.variaveis holds name of worksheet need. file saved xlsx. here error:

error in (function (classes, fdef, mtable)  :    unable find inherited method function ‘readworksheet’ signature ‘"character", "character"’ 

i searched error online, nothing showed up. if me resolve problem, i'd appreciate it. system information in case need them:

operating system: windows 10

r version: 3.2.3

rstudio version: 0.99.473

java version: 8.0_66

again, lot.

i figured out how resolve issue. i'm posting answer here in case else runs problemj, search wouldn't fruitless. replaced line of code above following 2 lines:

wb <- loadworkbook(file.path(dir.censo, arq.variaveis)) variaveis <- readworksheet(wb, sheet = sheet.variaveis) 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -