could not find function "" Calls: <Anonymous> ... handle -> withCallingHandlers -> withVisible -> eval -> eval

I just started using "R", so today I came across an issue that is could not find function "error. bar" notification is showing when I try to create an HTML markdown file, however when I tried to run the code chunk, It was working fine but even in the markdown script as well.
here is the code

Nhat_Count<-barplot(as.matrix(Nhat), main="least_count", 
                    ylab = "Numbers",ylim = c(0,450),las=3, 
                    cex.names=0.5,cex.lab = 1.5, cex.main = 1.4, 
                    beside=TRUE, col=c("grey","orange"))
legend("topleft", c("2018","2020"), 
       cex=1.3, bty="n", fill=c("grey","orange"))

please help

This means that the function does not exist in your current session.

  • where is it define in your script ?
  • Is this from a package ? Did you load it ?
  • Is there a typo in the function name ?

The message is rather clear, so you need to check what you want to do here.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

  1. No, it isnt defined in my script
  2. not that i know of that if its from a package or not
    3.nope there isnt a typo
    i have followed this
    format, so it worked in R and even in markdown script when i tried run the code chunks, but when i tried to create the html that time it was showing errors.

Sorry but i can't find the function on my R installation. ??
Where is it define ? in a package ? in your script ?
This function does not exist for me so I can't help more.