[R] Error in FUN(newX[, i], ...) : `x' must be atomic

Simon Blomberg blomsp at ozemail.com.au
Thu Jul 28 02:17:48 CEST 2005


Aah, OK. Thanks for the correction. I learn something new every day. That's 
why I like this list! Serves me right for relying on my Lisp knowledge.

Cheers,

Simon.


At 07:26 PM 27/07/2005, Peter Dalgaard wrote:
>Simon Blomberg <blomsp at ozemail.com.au> writes:
>
> > Actually, atoms are originally a Lisp concept. Objects are either atoms or
> > not. Atoms are data types that cannot be taken apart, such as numbers or
> > symbols. Lists and vectors (of length > 1) are examples of  non-atomic 
> data
> > types. Did you pass a vector to FUN?
>
>Actually, vectors ARE atomic in R, so your definition is somewhat off
>target.
>
> >  is.atomic(rnorm(5))
>[1] TRUE
>
>In the extreme, the only true atom is the bit, everything else can be
>taken apart - doubles into (sign,exponent,mantissa) etc. So languages
>*define* their own atoms, as objects that are not composed of other
>objects in the language. (And even that is a partial lie for R,
>because atoms can have attributes. Atomicity is purely based on the
>type of an object. The help page has a list of the atomic types.)
>
> > Cheers,
> >
> > Simon.
> >
> > At 12:22 PM 27/07/2005, Srinivas Iyyer wrote:
> > >Hello Group,
> > >  What is the meaning of the error.  is there any place
> > >to look for this. I guess 'atomic' seems to be OOP
> > >related concept.
> > >
> > >thank you
> > >srini
> > >
> > >______________________________________________
> > >R-help at stat.math.ethz.ch mailing list
> > >https://stat.ethz.ch/mailman/listinfo/r-help
> > >PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> >
> > Simon Blomberg, B.Sc.(Hons.), Ph.D, M.App.Stat.
> > Centre for Resource and Environmental Studies
> > The Australian National University
> > Canberra ACT 0200
> > Australia
> > T: +61 2 6125 7800 email: Simon.Blomberg_at_anu.edu.au
> > F: +61 2 6125 0757
> > CRICOS Provider # 00120C
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> >
>
>--
>    O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
>   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
>  (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
>~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list