This is the exact message:
Warning in do.call(.f, args, envir = .env) :
'what' must be a function or character string
Working in an Azure Databricks environment for data processing using R, spark and the tidyverse. This message appears even when running an empty command cell.
# library(sparklyr)
# library(lubridate)
# library(dplyr)
# library(purrr)
# library(httr)
# library(jsonlite)
# library(tidyr)
# library(arrow)
# library(stringr)
# library(DBI)
# library("readxl")
and I use
# if(!require(*library*)){
# install.packages(*"library"*)
# }
Is this something I should worry about with this warning or that I should be checking? I don't understand the warning and could not find the right documentation on google.
Looks to me if some genius package maintainer has masked (~overwritten) something important or uses a (function's) name rather than a character string in do.call
.
You can reproduce the issue like so.
do.call(rbind, list()) ## using the name works as expected
# NULL
Now let's mask rbind
rbind <- 1
do.call(rbind, list()) ## using the name fails
# Error in do.call(rbind, list()) :
# 'what' must be a function or character string
Voilá.
It's safer to use the character string here, which won't fail.
do.call('rbind', list())
# NULL
rm(rbind) ## unmask `rbind`.
The solution is tricky, since you're loading a ton of libraries. You could do the following though:
Renviron.site
and Renviron.site
files for unusual entries (can be found in the /etc/R/
folder on Linux), alternatively maybe start a R -vanilla
sessionlibrary
one by one until the error occurs