FLCore lattice-methods {FLCore} | R Documentation |
These are implementations of the most common lattice plots to FLQuant objects.
The implementation of these methods make use of as.data.frame
to coerce FLQuant objects into data frames that can be feeded to the lattice methods. The data frame will have the same names as the dimnames and the data it self will be on a data
column. The main effect of this procedure is that if one wants to call for a lattice method with a formula, as we advice, it must use data~...
.
Lattice is implemented in S3 and the S4 generic functions were defined by us. The mechanism is quite ugly and the implementations are terrible hacks, although they work in the end (nobody really knows why ...). The main side effect is that the generic is defined for a formula
object although it is suppose to act based on the FLQuant object that is feeded with the data
argument.
The FLCore Team
xyplot
, FLQuant-class, \code{bubbles-methods}
data(ple4sex) # plot the ages per year for males xyplot(data~age|year, data=trim(ple4sex@catch.n, unit="male"), type="b") # make use of FLQuants to plot males and females together plelst <- list(males=trim(ple4sex@catch.n, unit="male"), females=trim(ple4sex@catch.n, unit="female")) flqs <- FLQuants(plelst) xyplot(data~age|year, data=flqs, type="b", auto.key=TRUE) # use boxplots to explore the variability along the years bwplot(data~age|unit, data=ple4sex@catch.n) # or just take a look at all results dotplot(data~age|unit, data=ple4sex@catch.n) # plot the age frequencies per year for males barchart(data~age|year, data=trim(ple4sex@catch.n, unit="male")) # or compare the last 10 years per sex barchart(data~age|year*unit, data=trim(ple4sex@catch.n, year=1990:2000)) # be carefull with what you do with histogram ... # probably it makes sense for simulation situations ... histogram(~data|year, data=ple4sex@catch.n)