Problem with drc package


#1

Hi,
I've installed the drc package successfully, however when I run one of its functions I get this messege.
here is my code in short (quite new to R, havnt mastered reprex/tidyverse yet, sorry...) :

library(drc)
dose <- c(0, 36, 72, 144, 288, 432, 576)
response <- c(100, 116.3949, 91.93841, 13.76812, 0, 0, 0)
Hormesis.bcm1 = drm( response~dose, fct=bcl4())

this is what I get:

Error in drm(response ~ dose, fct = bcl4()) : 
  could not find function "drm"

#2

It means this function does not seem to exist.
When looking at drc documentation, there is no function dmc
https://www.rdocumentation.org/packages/drc/versions/3.0-1

Are you sure this is the correct function?
Consult the help of the :package: to find all existing function.


#3

If you are looking for the drm() function, it seems to be in the package of the same name.
https://www.rdocumentation.org/packages/drm/versions/0.5-8

(I haven't used drc or drm, but thought I'd point it out just in case).


#4

The function drm() is part of the drc package, and I should note that this code works on other pcs, just not mine.
I get this error message also when running other function such as reprex() (after calling library(reprex) of course)
Could it be that the package is not wholly installed?


#5
library(drc)
grep("drm", ls("package:drc"), value = TRUE)
#> [1] "drm"  "drmc" "rdrm"

You're right sorry. I did not know {drc} :package: and I blindly followed the website for rdocumentation and it was not present there (strangely) :man_facepalming:

You should get an error is a package is not correctly installed. However, you can try reinstall it from CRAN with install.packages("drc", repos = "https://cloud.r-project.org/"), it is never a bad idea (unless you don't want the last version)


#6

well, problem solved.. it was the anti-virus that prevented the installing of the dependencies...
thank you for your help anyway!