On Thu, Sep 26, 2002 at 12:17:09PM +0200, Nolwenn Le Meur wrote:> How can I give the name of my data frame to the output file ? > > exp: > mydata<-read.table(mydata,..) > ... > ... > write.table(x, file="c:/" mydata,...)write.table(x,file=paste(sep="","c:/",deparse(substitute(mydata)))) Check the help files on deparse(), substitute(), and paste() Jason -- Indigo Industrial Controls Ltd. 64-21-343-545 jasont at indigoindustrial.co.nz -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
How can I give the name of my data frame to the output file ?
exp:
mydata<-read.table(mydata,..)
...
...
write.table(x, file="c:/" mydata,...)
Nolwenn Le Meur
********************************************
Nolwenn Le Meur
INSERM U533
Facult? de m?decine
1, rue Gaston Veil
44035 Nantes Cedex 1
France
Tel: (+33)-2-40-41-29-86 (office)
(+33)-2-40-41-28-44 (secretary)
Fax: (+33)-2-40-41-29-50
mail: nolwenn.lemeur at nantes.inserm.fr
********************************************
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Thu, 26 Sep 2002, Nolwenn Le Meur wrote:
%How can I give the name of my data frame to the output file ?
%
%exp:
%mydata<-read.table(mydata,..)
%...
%...
%write.table(x, file="c:/" mydata,...)
write.tbale(x,file=paste("c:/",expression(mydata),sep=""))
JN
%
%Nolwenn Le Meur
%
%********************************************
%Nolwenn Le Meur
%INSERM U533
%Faculté de médecine
%1, rue Gaston Veil
%44035 Nantes Cedex 1
%France
%
%Tel: (+33)-2-40-41-29-86 (office)
% (+33)-2-40-41-28-44 (secretary)
%Fax: (+33)-2-40-41-29-50
%mail: nolwenn.lemeur at nantes.inserm.fr
***********************************************************************
Jens Nieschulze
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
At 12:17 26/09/02 +0200, you wrote:>How can I give the name of my data frame to the output file ? > >exp: >mydata<-read.table(mydata,..) >... >... >write.table(x, file="c:/" mydata,...)This may do the trick: write.table(x, file=paste("c:/", deparse(substitute(mydata)), sep = ""), ...) EP>Nolwenn Le Meur > >******************************************** >Nolwenn Le Meur >INSERM U533 >Facult? de m?decine >1, rue Gaston Veil >44035 Nantes Cedex 1 >France > >Tel: (+33)-2-40-41-29-86 (office) > (+33)-2-40-41-28-44 (secretary) >Fax: (+33)-2-40-41-29-50 >mail: nolwenn.lemeur at nantes.inserm.fr >******************************************** > >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.->r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html >Send "info", "help", or "[un]subscribe" >(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch >_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._> >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._