I've set up and been regularly updating my R package to GitHub following Hadley's extensive documentation about Devtools, Roxygen2 etc., on my laptop. Yesterday I decided to use my main PC instead and am now looking to push changes up to GitHub. I got the following error after entering document()
:
Error: 'Adult_Females' is not an exported object from 'namespace:gbm.auto'
Adult_Females is the name of the first data file in /Data. According to this (scroll down to 'Data')
"files that live in data/ don’t use the usual namespace mechanism and don’t need to be exported."
So... what's a guy to do? I've not edited Adult_Females in any way and the R script I edited doesn't reference it. My suspicion is that this error will pop up for all the data files and it just happened that this is the first of them, but that's conjecture at this point.
Thanks in advance. install_github("SimonDedman/gbm.auto")
if you want to have a look.
2020/01/25 edit: looks like I've fixed it. A commit on 26/11/19 saw /Data and all RData files added, with subsequent commit deleting the identical /data folder and files. Not sure if I did that myself, can't think why I would suddenly decide to, but such mysteries are now lost to the sands of time. This change and document() and commit caused the .R files to be removed as export()s from NAMESPACE and the RData files to no longer trigger the titular "data not exported" problem EVEN THOUGH this isn't noted anywhere in DESCRIPTION, NAMESPACE, nor the files themselves. May this weirdness be a lighthouse that warns others of the rock I've spent the last 3 years trapped on!
gbm.auto::Adult_Females
in a couple of places. Did you try dropping thegbm.auto::
? – RhymesterAdult_Females
should work fine.::
is intended to be used with exported objects specifically, so I believe prependinggbm.auto::
is what is causing the error. – Rhymester