I was wondering how I could have d
in my R code below be used in legend
?
Note that the reason I don't use d = c("dnorm", "dcauchy")
is that in my actual code I need to use d[[1]](0)
which doesn't work with quotations.
plot(1)
d = c(dnorm, dcauchy)
legend("topleft", legend = d) ## HERE how can I have the two terms:
## dnorm and dcauchy in `d` appear as legend?