[R] avoiding (another) error
Lorenz Gygax
lgygax at access.unizh.ch
Fri Jan 8 10:34:29 CET 1999
Dear all,
Many thanks to all who always so quickly respond with helpful hints!
Currently I am working with R 0.63.1 on SuSE 5.2 which I installed this
morning within about half an hour: my deepest compliments to the
developpers! (I had still 0.62.2 before.)
This time I am trying the following:
> xy <- list (a= c (1, 2, NA), b= c (2, 3))
> list.name <- "xy"
> get (list.name)$a [is.na (get (list.name)$a)] <- 0
Error: couldn't find function "get<-"
> xy
$a
[1] 1 2 0
$b
[1] 2 3
So obvisouly R does what I would like it to do. How can I get it to do it
without the error? The problem is that I need to do this within a
function.
Thanks for ideas and hints! Regards,
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lorenz Gygax LGygax at amath.unizh.ch; room: 36-L-40
Department of Applied Mathematics
University of Zuerich-Irchel
Winterthurerstr. 190; CH-8057 Zurich
voice: 41-1-635-58-52 fax: 41-1-635-57-05
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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