0

I have a R package that I created and I use this line in some function:

de.genes= AnnotationDbi::select(org.Hs.eg.db, columns = c("SYMBOL", "ENTREZID"), keys = de.genes, keytype="SYMBOL")

when I call this function after installing the package I get an error : Error in AnnotationDbi::select(org.Hs.eg.db, columns = c("SYMBOL", "ENTREZID"), : object 'org.Hs.eg.db' not found

it works only if I runs library(org.Hs.eg.db) before I call the function or inside it.

thanks for help.

Sagi
  • 11
  • 2
  • Did you list org.Hs.eg.db as a dependency in your package DESCRIPTION file? See https://stackoverflow.com/questions/22565024/how-to-properly-include-dependencies-in-r-package for more info – MrFlick Mar 15 '22 at 17:43
  • Yes that was the problem. Thanks very much!! – Sagi Mar 17 '22 at 14:48

0 Answers0