Dear all, While I am executing my code I receive the error below Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) : 'x' must be atomic the weird thing that I am not calling anywhere sort function nor do I rely on anyh sorting. How I can discover where this comes from (inside which function?). I would like to thank you in advance for your help B.R Alex [[alternative HTML version deleted]]
I call upon the great and mighty Google (hallowed be its name) to discover: traceback() and its more powerful cousin options(error = recover) Michael On Mon, Mar 19, 2012 at 3:22 PM, Alaios <alaios at yahoo.com> wrote:> Dear all, > While I am executing my code I receive the error below > > Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) : > ? 'x' must be atomic > > > the weird thing that I am not calling anywhere sort function nor do I rely on anyh sorting. > How I can discover where this comes from (inside which function?). > > I would like to thank you in advance for your help > > B.R > Alex > > ? ? ? ?[[alternative HTML version deleted]] > > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
Call traceback() after seeing the error message.
E.g.,
> factor(list(1, 2:3, 4:6))
Error in sort.list(y) : 'x' must be atomic for 'sort.list'
Have you called 'sort' on a list?
> traceback()
3: stop("'x' must be atomic for 'sort.list'\nHave you
called 'sort' on a list?")
2: sort.list(y)
1: factor(list(1, 2:3, 4:6))
>
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at
r-project.org] On Behalf
> Of Alaios
> Sent: Monday, March 19, 2012 12:22 PM
> To: R help
> Subject: [R] where this Error comes from?
>
> Dear all,
> While I am executing my code I receive the error below
>
> Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) :
> ? 'x' must be atomic
>
>
> the weird thing that I am not calling anywhere sort function nor do I rely
on anyh sorting.
> How I can discover where this comes from (inside which function?).
>
> I would like to thank you in advance for your help
>
> B.R
> Alex
>
> [[alternative HTML version deleted]]
?traceback ?options ## consider changing error option to recover ?debug Search on debugging in R to find more possibilities. R is a programming language. You need to learn how to debug code if you wish to program in R. -- Bert On Mon, Mar 19, 2012 at 12:22 PM, Alaios <alaios at yahoo.com> wrote:> Dear all, > While I am executing my code I receive the error below > > Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) : > ? 'x' must be atomic > > > the weird thing that I am not calling anywhere sort function nor do I rely on anyh sorting. > How I can discover where this comes from (inside which function?). > > I would like to thank you in advance for your help > > B.R > Alex > > ? ? ? ?[[alternative HTML version deleted]] > > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm