BiologicalRecordsCentre / BRCindicators

An R package for creating indicators from trends data
4 stars 11 forks source link

Documentation for Lambda Indicator array #39

Closed galinajonsson closed 4 years ago

galinajonsson commented 4 years ago

The documentation for the array structure needed to run lambda_indicator() could do with some clarification. I assume the data in the below example should be the occupancy/index values from first to last year of sp1 followed by first to last year of sp2 etc. but it's not entirely clear from the documentation.

# Build a random set of data
myArray <- array(data = rnorm(n = nsp*nyr*iter,
                               mean = 0.5,
                               sd = 0.1),
                  dim = c(nsp, nyr, iter),
                  dimnames = list(paste0('SP',1:nsp),
                                  1:nyr,
                                  1:iter))
JHHatfield commented 4 years ago

Yes, the example that you give produces an array in the correct format. I will look at adding more information to the function help.

AugustT commented 4 years ago

Yeah, a text description would be nice

JHHatfield commented 4 years ago

Should now be covered in recent pull request