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

2013-03-14 Thread Thomas Lumley
On Fri, Mar 15, 2013 at 1:05 AM, robert.koellner wrote: > > But now I get new error massages: > > Error in wilcox.test.default(measurement, mu = 0) : > not enough (finite) 'x' observations > 'Not enough' here means none. You tried to do a test on a sample of size zero. > In addition: There w

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

2013-03-14 Thread PIKAL Petr
Hi > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of robert.koellner > Sent: Thursday, March 14, 2013 1:05 PM > To: r-help@r-project.org > Subject: Re: [R] error: object of type 'closure' is not sub

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

2013-03-14 Thread robert.koellner
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) +

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

2013-03-14 Thread robert.koellner
Hi all, when i run this script: >read.table("Angelika.txt",header=T,sep="\t") >mytable=read.table("Angelika.txt",header=T,sep="\t") >for ( dye in c("A","B","C","F","G","K","L","M")) + { + for (cond in 1:8) + { + measurement = table[mytable[,"bed"]==cond & mytable[,"dye"

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

2010-01-18 Thread Romain Francois
On 01/17/2010 09:00 PM, Rolf Turner wrote: I thought it would be possible to make rep() work for functions by writing a method for the function class. I tried: rep.function <- function(x,...) { times <- as.list(...)[[1]] rslt <- vector("list",times) rslt[1:times] <- list(x) rslt } But then doin

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

2010-01-17 Thread Rolf Turner
I thought it would be possible to make rep() work for functions by writing a method for the function class. I tried: rep.function <- function(x,...) { times <- as.list(...)[[1]] rslt <- vector("list",times) rslt[1:times] <- list(x) rslt } But then doing rep(sin,2) still gave an

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

2010-01-13 Thread Gabor Grothendieck
See ?rep where it says that the argument must be a vector. Try rep(list(sin), 3) On Wed, Jan 13, 2010 at 8:11 PM, Matthew Walker wrote: > Hi everyone, > > Would somebody please explain (or point me to a reference that explains) the > following error: > > "Error: object of type 'closure' is no

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

2010-01-13 Thread Matthew Walker
Hi everyone, Would somebody please explain (or point me to a reference that explains) the following error: "Error: object of type 'closure' is not subsettable" I was trying to use rep() to replicate a function: > example_function <- function() { return(TRUE) } > rep(example_function, 3) Erro