[R] r help message

S.McClatchie s.mcclatchie at niwa.cri.nz
Thu Jan 18 03:52:58 CET 2001


Colleagues

----------------------------------
System info:
R version rw1020 on NT
ESS using emacs ver. 20.4

----------------------------------

To keep my scripts short and tidy, I want to call sub-functions and return
variables from these for subsequent use in the calling function.

e.g.

"test.smooth.opc.time.series" <-
  function()             

{
  load.opc.ascii.files()
}

Within the sub-function "load.opc.ascii.files" I have tried two ways of
assigning variables for use by the calling function
"test.smooth.opc.time.series":

 dir <<- c('h:/data/nov99_tan9913/opc/')

This works but clutters the workspace.

assign(dir,  c('h:/data/nov99_tan9913/opc/')), envir = 
test.smooth.opc.time.series)          

Which returns an odd error telling me there is an invalid first argument
in assign. I don't see why, after reading the help on this function.

Any suggestions? Help will be appreciated.
Thanks

Sam

Sam McClatchie, Research scientist (fisheries acoustics))))))))))
NIWA (National Institute of Water & Atmospheric Research Ltd)
PO Box 14 901, Kilbirnie, Wellington, New Zealand
s.mcclatchie at niwa.cri.nz 

                    /\
...>><xX(°> // \\
                 /// \\\   
                //// \\\\
               ///  <°)Xx><<
              /////  \\\\\\
        ><(((°>   
  >><(((°>   ...>><xX(°>O<°)Xx><<

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list