I am wrting a package and would like to be able to export it to access it with: packagename::dataset This is how my roxygen doc for the data object looks like: #' Data frame with amino acid masses #' #' @name AminoAcids #' @docType data #' @keywords data #' @export NULL It does end up in the namespace file with: export(AminoAcids) the data is in the data/ folder of the package. and I can load it with data(AminoAcid) Still R CMD build gives me the error: Error : 'AminoAcids' is not an exported object from 'namespace:bibliospec' because I am trying to access it with bibliospec::AminoAcids Help highly appreciated. Thank you -- Witold Eryk Wolski
Please post this to the R-package-devel list, not here. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sat, Dec 10, 2016 at 6:47 AM, Witold E Wolski <wewolski at gmail.com> wrote:> I am wrting a package and would like to be able to export it to access it with: > > packagename::dataset > > This is how my roxygen doc for the data object looks like: > #' Data frame with amino acid masses > #' > #' @name AminoAcids > #' @docType data > #' @keywords data > #' @export > NULL > > It does end up in the namespace file with: > export(AminoAcids) > > the data is in the data/ folder of the package. > and I can load it with data(AminoAcid) > > Still R CMD build gives me the error: > Error : 'AminoAcids' is not an exported object from 'namespace:bibliospec' > > because I am trying to access it with bibliospec::AminoAcids > > Help highly appreciated. > > Thank you > > -- > Witold Eryk Wolski > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
In addition to Bert's suggestion, you might want to check here... http://r-pkgs.had.co.nz/man.html#man-data> On Dec 10, 2016, at 10:25 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > > Please post this to the R-package-devel list, not here. > > > -- Bert > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Sat, Dec 10, 2016 at 6:47 AM, Witold E Wolski <wewolski at gmail.com> wrote: >> I am wrting a package and would like to be able to export it to access it with: >> >> packagename::dataset >> >> This is how my roxygen doc for the data object looks like: >> #' Data frame with amino acid masses >> #' >> #' @name AminoAcids >> #' @docType data >> #' @keywords data >> #' @export >> NULL >> >> It does end up in the namespace file with: >> export(AminoAcids) >> >> the data is in the data/ folder of the package. >> and I can load it with data(AminoAcid) >> >> Still R CMD build gives me the error: >> Error : 'AminoAcids' is not an exported object from 'namespace:bibliospec' >> >> because I am trying to access it with bibliospec::AminoAcids >> >> Help highly appreciated. >> >> Thank you >> >> -- >> Witold Eryk Wolski >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.Ben Tupper Bigelow Laboratory for Ocean Sciences 60 Bigelow Drive, P.O. Box 380 East Boothbay, Maine 04544 http://www.bigelow.org
I am wrting a package. I have a dataset in data/AminoAcids.tsv and would like to be able to access it with bibliospec::AminoAcids from within my package code. R CMD build gives me the error: Error : 'AminoAcids' is not an exported object from 'namespace:bibliospec' I am able to access the data in package code with data(AminoAcids) AminoAcids but this will give me a NOTE with R CMD check Also when using the package I am able to access the data with bibliospec::AminoAcids So why can't I access bibliospec::AminoAcids from within package code? This is how my roxygen doc for the data object looks like: #' Data frame with amino acid masses #' #' @name AminoAcids #' @docType data #' @keywords data NULL Help highly appreciated. Thank you -- Witold Eryk Wolski -- Witold Eryk Wolski