Skip to content

compose a name in function

3 messages · Rafael Bertola, Brian Ripley, Uwe Ligges

#
I write a function to plot some graphs and a gave for it one result of
lm() (reg) and a character (name). In  win.metafile("name-%02d.wmf",
pointsize = 14) i want compose de name of file with the string i pass to
the function. How i can make this?

plota.res.grava <- function(reg,name){

    win.metafile("name-%02d.wmf", pointsize = 14)
...
}

Thanks
R. Bertola
-- 
  
  bertola at fastmail.fm
#
?paste

as in

win.metafile(paste(name, "%02d.wmf", sep="-"), pointsize = 14)
On Mon, 2 Jun 2003, Rafael Bertola wrote:

            

  
    
#
Rafael Bertola wrote:

            
Use paste(), as in

  win.metafile(paste(name, "%02d.wmf", sep="-"), pointsize = 14)

Uwe Ligges