After going through different posts, I came to know that default directory that an R package installed was not included in the library path when running R script inside a php script [R package not working properly when using PHP exec() function . As a result, the message "there is no package called BayesPeak" is displayed in browser.I tried to use .libPaths() in my following R code, but failed. As a beginner, I am not aware of how to use .libPaths() to solve the issue. I wish anyone help me.
require(chipseq)
require(BayesPeak)
mydata = read.xls("mydata.xls")