Skip to content
Prev 379848 / 398500 Next

Pasting R code lines into labels

Thanks but that's not quite what I meant
I am trying out different functions and they don't necessarily vary in a regular way (like say all being powers of x where it'd be simple to just have a vector for the powers you want)
So I might have
y<-x^2
y<-cos(x)
y<-exp(x+1)
What I am after is a way of running these functions and then calling each one into the labelling for the appropriate graph as I plot it.  So then I would have something like
mainlab<-paste("Plot of ",function in question)
...? Thanks Nick