Re: [R-pkg-devel] accessing data by packagename::dataname from within package code fails.

2016-12-12 Thread William Dunlap
You can define the data in the R directory. You can keep it all in a *.R file by wrapping the text of the *.csv file in quotes and using read.table(text="quoted stuff"), as in: theData <- read.csv(header=TRUE, text=" English,Digit One,1 Two,2 Three,3") N <- nrow(theData) You need to make sure 't

Re: [R-pkg-devel] accessing data by packagename::dataname from within package code fails.

2016-12-12 Thread Witold E Wolski
I have narrowed down the problem. The error Error : 'AminoAcids' is not an exported object from 'namespace:bibliospec' Error : unable to load R code in package 'bibliospec' occurs only if I try to access the data using bibliospec::AminoAcids within the initialize method of an R reference class. I

[R-pkg-devel] accessing data by packagename::dataname from within package code fails.

2016-12-12 Thread Witold E Wolski
I am wrting a package called bibliospec. 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 t