Error in sprintf("%s not found! Interpreting dose as nanomolar concentrations.") issue
platanus-study opened this issue · comments
I have the problem associated with sprint error in R 3.6.3(using Rstudio terminal tab).
Let me know how to solve below error.
-Command used in Rstudio terminal tab-
Rscript AP_simulation.R -d drug1 -x "1-10,15,20,25" --cmaxfile="my_cmax_table.csv" --hergpath="path/to/herg/results/" --hillpath="path/to/hill/results/"-
-Error result example-
loaded via a namespace (and not attached):
[1] compiler_3.6.3 getopt_1.20.3
Error in sprintf("%s not found! Interpreting dose as nanomolar concentrations.") :
Calls: print -> sprintf
-Rcode part(AP_simulation.R) that may occur error-
#--- get therapeutic concentration (Cmax)
if(drug=="control"){
cmax<-0
}else{
if(!file.exists(cmaxfile)){
cmax<-1
print(sprintf("%s not found! Interpreting dose as nanomolar concentrations."))
}else{
drugtable<-read.csv(cmaxfile)
cmax<-drugtable[as.character(drugtable$drug)==drug,"therapeutic"] # should be in nanomolar
if(length(cmax)==0){
cmax<-1
print(sprintf("Cmax undefined, interpreting dose as nanomolar concentrations."))
}else if(length(cmax)==1){
print(sprintf("Cmax set to %g nM, interpreting dose as multiples of Cmax.",cmax))
}else{
stop("Multiple entries for %s therapeutic concentration!",drug)
}
}
}
The command that you entered is for your own data and needs "my_cmax_table.csv" in the current working directory but I believe that you don't have it.
If you're just testing the scripts and do not possess your experiment data, you do not need to run this command. (Optional)