[R] error: object of type 'closure' is not subsettable

PIKAL Petr petr.pikal at precheza.cz
Thu Mar 14 17:43:31 CET 2013


Hi

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of robert.koellner
> Sent: Thursday, March 14, 2013 1:05 PM
> To: r-help at r-project.org
> Subject: Re: [R] error: object of type 'closure' is not subsettable
> 
> Edit: OK I got it
> 
> >for ( dye in c("A","B","C","F","G","K","L","M"))
> +      {
> +      for (cond in 1:8)
> +          {
> +          measurement = *my*table[mytable[,"bed"]==cond &
> mytable[,"dye"]==dye,"differenz"]
> +          print(median(measurement))
> +          wilcox.test(measurement,mu=0)
> +          }
> +       }
> 
> But now I get new error massages:
> 
> Error in wilcox.test.default(measurement, mu = 0) :
>   not enough (finite) 'x' observations
> In addition: There were 11 warnings (use warnings() to see them)
> > warnings()
> Warning messages:
> 1: In wilcox.test.default(measurement, mu = 0) :
>   cannot compute exact p-value with ties
> 2: In wilcox.test.default(measurement, mu = 0) :
>   cannot compute exact p-value with zeroes
> 3: In wilcox.test.default(measurement, mu = 0) :
>   cannot compute exact p-value with zeroes
> 4: In wilcox.test.default(measurement, mu = 0) :
>   cannot compute exact p-value with ties
> 5: In wilcox.test.default(measurement, mu = 0) :
>   cannot compute exact p-value with ties
> 6: In wilcox.test.default(measurement, mu = 0) :
>   cannot compute exact p-value with ties
> 7: In wilcox.test.default(measurement, mu = 0) :
>   cannot compute exact p-value with zeroes
> 8: In wilcox.test.default(measurement, mu = 0) :
>   cannot compute exact p-value with zeroes
> 9: In wilcox.test.default(measurement, mu = 0) :
>   cannot compute exact p-value with ties
> 10: In wilcox.test.default(measurement, mu = 0) :
>   cannot compute exact p-value with ties
> 11: In wilcox.test.default(measurement, mu = 0) :
>   cannot compute exact p-value with ties
> 
> What does this mean?

It probably means that

measurement = *my*table[mytable[,"bed"]==cond & mytable[,"dye"]==dye,"differenz"]

gives you too few items in measurement variable

what is the result of

*my*table[mytable[,"bed"]==1 & mytable[,"dye"]=="A","differenz"]

But it is just guess as the code is not reproducible.

Regards
Petr


> OK can´t compute with zeros, but why? The test should compare the
> mediandifference to 0 and if the values are 0 it should be 1, or not?
> And what means 'cannot compute exact p-value with ties'?
> 
> Greetings
>  Robert
> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/error-
> object-of-type-closure-is-not-subsettable-tp4661305p4661316.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> 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.


More information about the R-help mailing list