[R] npmc function: 'x' must be atomic

Patrick Drechsler patrick.drechsler at gmx.net
Tue Jun 22 17:05:33 CEST 2004

Hi Brian,

thanks for the quick reply! 

Brian Ripley wrote on 22 Jun 2004 15:38:38 MET:

> On Tue, 22 Jun 2004, Patrick Drechsler wrote:


> traceback()/dump.frames/debugger() to pinpoint the error?

Wasn't aware of those, thanks for the pointer.

> Telling us where you got npmc from? (I suspect you mean the one
> in package npmc.)

> install.packages("npmc")

> Noticing that `x' is not the same name as `mydata'?

I noticed that also but I have no idea where the `x' is coming from.

> I am sure that the hint to make use of R's debugging facilities
> is there hundreds of times.

Yup, thanks. I'll take a closer look at those facilities.

Here's another example (hopefully more complete):

> rm(list=c(ls()))
> a <- 1:10;
> b <- rep(c(0,1),5)
> mydata <- cbind(a,b)
> library(npmc)
> npmc(mydata, df=2, alpha=0.05)
Error in sort(unique.default(x), na.last = TRUE) : 
	`x' must be atomic
> traceback()
4: stop("`x' must be atomic")
3: sort(unique.default(x), na.last = TRUE)
2: factor(dataset$class)
1: npmc(mydata, df = 2, alpha = 0.05)
> x
Error: Object "x" not found

platform i686-pc-linux-gnu
arch     i686             
os       linux-gnu        
system   i686, linux-gnu  
status   alpha            
major    1                
minor    9.1              
year     2004             
month    06               
day      07               
language R                

TIA (and sorry for the privat email -- I hit the wrong button),

Black Holes result from God 
dividing the universe by zero.

More information about the R-help mailing list