[R] return character

Judy Chung cp3942 at gmail.com
Tue Dec 6 07:22:52 CET 2005


Hi All,
I have several lines of commands, and beacuse I will use these many
times, so I collected
these commands together using a function to describe it. like the following:
my.fun<-function(){
   .........
   entertitle()
   xaxis<-A
   yaxis<-B
   plot(....,xlab=xaxis,ylab=yaxis)
   .......
}

entertitle<-function()  {
   cat("enter the name of A\n")
   A<-readline()
   cat("enter the name of B\n")
   B<-readline()
   return(A,B)
}
I hope the A and B generate form function " entertitle " can return to
my.fun, and
do the following processing. Am I missing something? Any help as to
where to start would be welcome. Thanks in advanced !!




More information about the R-help mailing list