Skip to content
Prev 7019 / 21312 Next

[Bioc-devel] A question on adding data in R package development

Dear Dongmei,
On 28 February 2015 14:08, Li, Dongmei wrote:

            
You are right in putting your serialised object in the data
subdirectory. Once your package is installed, these objects can be
loaded by simply typing

  data(ovarian_cancer_ex)

Note that you will also need to write a man page.

The reason you see the error is because the package is not build in its
original location, and hence the file can not be found with the
hardcoded path. In such situations, when you want to get the path to a
file in a package, for example the extdata directory, you would

  system.file("extdata", package = "Biobase")

Hope this helps,

Laurent