Skip to content
Prev 362082 / 398502 Next

Turning a variable name into a function argument

Thanks for getting back to me, I?m sorry if I was unclear.

What I?m trying to figure out is the equivalent of ?find and replace? in Word.

I have a function - 

myfun <- function(z){
ggplot(df, aes(x,y)+
geom_point() + 
ggtitle (?_______ quick brown fox jumped over the lazy dog?)}

Calling myfun(z) works perfectly.  What I?m trying to do is add a string to myfun so that it would read:  function(z, ?string?){

Then I could call myfun(z, ?string?) to replace the space in ggtitle.  Is there a straightforward way to do that?

Ken
kmnanus at gmail.com
914-450-0816 (tel)
347-730-4813 (fax)