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.