flr/FLa4a

documentation on utilities

Closed this issue · 1 comments

  1. The help page that contains 5 of the methods (“Assorted methods needed by FLa4a”) is not entirely satisfactory. It starts off with a description of is.empty (in the Usage and Arguments fields), and then deals with each of the 5 methods in turn (each then has its own heading, including, again, is.empty). Since 5 methods are being covered, it does not make sense to have a Usage and Arguments field that covers only is.empty, so those fields should be removed. I’ve tried to separate out the examples by heading them up with the appropriate method.

(a) is.empty:
Minor edits

(b) pars2dim:
This method is already found in the FLModelSimMethods.R file. Is there a need for it to appear in two places? Otherwise minor edits only. The second example could be a little better since it is not so intuitive: pars2dim(FLPar(array(dim=c(1,1,1)))), but I have left it for now.

(c) getYidx:
Minor edits

(d) niters:
This method is already found in a4aGR-class.R. As above, does it need to be in two places? Also, it doesn’t work with FLQuants, so I’m not so sure the description is accurate: “Compute number of iterations. Takes an object of any \code{FLR} class and returns a \code{numeric}.” Could one say rather that “Takes an object of any \code{FLR} class and returns a \code{numeric}”? I have left it as is for now, but please advise. Also, I included the following examples:

' @examples

' #Example use of niters:

' mm <- matrix(NA, ncol=3, nrow=3)

' diag(mm) <- c(50, 0.001,0.001)

' mm[upper.tri(mm)] <- mm[lower.tri(mm)] <- c(0.1,0.01,0.00004)

' vbObj <- a4aGr(grMod=~linf_(1-exp(-k_(t-t0))), grInvMod=~t0-1/k*log(1-len/linf), params=FLPar(linf=58.5, k=0.086, t0=0.001, units=c("cm","yr^-1","yr")), vcov=mm, distr="norm")

' # Generate 100 sample sets

' vbObj <- mvrnorm(100,vbObj)

' niters(vbObj)

(e) dims:
Minor edits, and added a simple example:

' @examples

' #Example use of dims:

' dims(FLPar())

  1. plotc:

Could not get a help page for this. Also, the example that was included did not work, so I changed it to the following:

' @examples

' data(ple4)

' data(ple4.index)

' obj <- sca(ple4, FLIndices(ple4.index))

' plot(obj, ple4)

  1. ploti:

Could not get a help page for this. Also, the example that was included did not work, so I changed it to the following:

' @examples

' data(ple4)

' data(ple4.index)

' obj <- sca(ple4, FLIndices(ple4.index))

' plot(obj, FLIndices(ple4.index))

  1. getADMBHessian:

The value descriptor for this is incomplete. Please advise as to what needs to go into it. All it says is:

' @return a list with the following elements

There is nothing else…

  1. getADMBCovariance:

This does work, but there is no help page for it, so I have not included an example either. But the example would be very simple:

getADMBCovaraiance(wkdir), where wkdir is from 4 above.

Fixed in manpages. I'm not happy with the solution, maybe will go back to split each method in a different page.