Re: [R] paste argument of a function as a file name

2005-11-23 Thread Martin Maechler
UweL == Uwe Ligges [EMAIL PROTECTED] on Thu, 10 Nov 2005 15:11:45 +0100 writes: UweL Luis Ridao Cruz wrote: R-help, I have a function which is exporting the output to a file via write.table(df, file = file name.xls ) What I want is to paste the file name

[R] paste argument of a function as a file name

2005-11-10 Thread Luis Ridao Cruz
R-help, I have a function which is exporting the output to a file via write.table(df, file = file name.xls ) What I want is to paste the file name (above) by taking the argument to the function as a file name something like this: MY.function- function(df) { ... ...

Re: [R] paste argument of a function as a file name

2005-11-10 Thread Sean Davis
On 11/10/05 8:28 AM, Luis Ridao Cruz [EMAIL PROTECTED] wrote: R-help, I have a function which is exporting the output to a file via write.table(df, file = file name.xls ) What I want is to paste the file name (above) by taking the argument to the function as a file name help('paste')

Re: [R] paste argument of a function as a file name

2005-11-10 Thread Romain Francois
Le 10.11.2005 14:28, Luis Ridao Cruz a écrit : R-help, I have a function which is exporting the output to a file via write.table(df, file = file name.xls ) What I want is to paste the file name (above) by taking the argument to the function as a file name something like this: MY.function-

Re: [R] paste argument of a function as a file name

2005-11-10 Thread Barry Rowlingson
Luis Ridao Cruz wrote: R-help, I have a function which is exporting the output to a file via write.table(df, file = file name.xls ) What I want is to paste the file name (above) by taking the argument to the function as a file name something like this: More like this: foo =

Re: [R] paste argument of a function as a file name

2005-11-10 Thread Adaikalavan Ramasamy
my.write - function( obj, name ){ filename - file=paste( name, .txt, sep=) write.table( obj, file=filename, sep=\t, quote=F) } my.write( df, output ) Regards, Adai On Thu, 2005-11-10 at 13:28 +, Luis Ridao Cruz wrote: R-help, I have a function which is exporting the output to a

Re: [R] paste argument of a function as a file name

2005-11-10 Thread Frede Aakmann Tøgersen
Why not use something like MY.function - function(x){ filn - deparse(substitute(x)) filename - paste(filn,xls,sep=.) ... ... write.table(x,file=filename) } Med venlig hilsen Frede Aakmann Tøgersen -Oprindelig meddelelse- Fra: [EMAIL PROTECTED] [mailto:[EMAIL

Re: [R] paste argument of a function as a file name

2005-11-10 Thread Uwe Ligges
Luis Ridao Cruz wrote: R-help, I have a function which is exporting the output to a file via write.table(df, file = file name.xls ) What I want is to paste the file name (above) by taking the argument to the function as a file name something like this: MY.function- function(df)