I have no idea why but I am quite sure the following did produce a plot a while back. Can you tell me what's wrong here?
library(ggplot2)
qplot(c(0, 2), stat="function", fun=exp, geom="line")
This returns "Error in c(0, 2) : unused argument (2)." Why?
Edit: This is a general problem:
a <- c(0, 2)
gives the same error. What's going on here?
Works for me with ggplot2 v 0.9.3.1. Based on your edit, I'm 99% sure you have a different c()
function defined in your workspace/loaded somewhere in your search path (getAnywhere("c")$where
), which is masking the built-in version.
To test, try starting from a clean session (with --vanilla
if possible to skip reloading workspace/executing .Rprofile
/etc.)
If you're lucky the problem is in your global workspace and rm("c")
will work -- otherwise you have to track down which package is loading this booby trap ... (find("c")
could be useful in that case ...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With