I just spent several hours trying to figure out why my package won't build.
==> devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette')) Updating xxxx documentation Loading xxxx Error: 'yyyy' is not an exported object from 'namespace:xxxx' Execution halted Exited with status 1.
I spent a long time searching around build options and namespaces, but the source of the problem is in the way I was saving an .RData file. I had been using a pipeline syntax which seems not to work as I was expecting. reprex below:
library(magrittr) # Why are these not equivalent? save(iris, file = "eg1.RData") iris %>% save(file = "eg2.RData") # This works load("eg1.RData") rm(iris) # This doesn't load("eg2.RData") rm(iris) #> Warning in rm(iris): object 'iris' not found
The problem is solved (don't use
obj %>% save()) and I can build the package, but I like using pipes and I'm curious as to why this doesn't work.