[FLR-list] bug in lh::noise

Poos, Jan Jaap janjaap.poos at wur.nl
Wed Jan 6 16:22:28 CET 2016


Hi,

OK, so the problem seems to be something else: aaply is in plyr, but this is not defined in the depends as a dependency.

Cheers, JJP 

-----Original Message-----
From: Poos, Jan Jaap 
Sent: woensdag, januari 06, 2016 16:14
To: flr-list at flr-project.org
Subject: bug in lh::noise

Hi, 

I am trying to use noise method in package lh, and it returns error Error in .local(n, len, ...) : could not find function "aaply" '. Indeed, in rand-noise.R there is 

# setMethod("noise", signature(n='numeric', len="missing"),
#           function(n,len))
          
setMethod("noise", signature(n='numeric', len="FLQuant"),
          function(n=n,len=len,sd=0.3,b=0) {
          
          if (dims(len)$iter!=1) stop("len can not have iter>1")
        
          res=aaply(len,c(1,3:5), function(x) 
            maply(seq(n), function(x) noiseFn(dims(len)$year,b=b,sd=sd,trunc=0)))
   .......................

I guess that should be "apply". I'll fix it in a local copy, maybe you can fix it on the repos that is used to build it. Thanks in advance.

Cheers, JJP 




More information about the flr-list mailing list