I read most of Hadley Wickham's book: http://r-pkgs.had.co.nz/ , but I am confused why my functions in my package cannot find my other non-exported functions.
For example, I have
map <- function(return.query, zoom, maptype, histObj) {
UseMethod("map")
}
map.querySold <- function(query, zoom = 11, maptype = "roadmap") {
My Code
}
Running this with a clean environment and downloading my package causes an error:
> map(x) # x is of class querySold
Error in UseMethod("map") :
no applicable method for 'map' applied to an object of class "c('querySold', 'data.frame')"
What is wrong and how can I fix it? I thought that internal functions are always available for all other functions inside the package? Until I load all the functions with devtools::load_all("."), it works.
source
share