examinevar | R Documentation |
examinevar tabulates and plots the properties of an input variable contained within an input data.frame. This function is designed to simplify the characterization of fisheries dependent data prior to conducting a statistical standardization. It does this by plotting for the input variable (invar), the records-by-year, the catch-by-year, and the effort-by-year. for each level of 'invar' it also counts the records across years, and sums the catches and effort across years. Each of these are stored either as .csv or .png files 'in rundir'. It also logs these files in resfile, which opens the possibility of displaying all results in a local webpage under a tab labelled by the contents of 'invar'. The 'rundir', 'resfile', and 'runname' should be the same as those used by makehtml to prepare a directory and 'resfile' to store the files to be used to make a local webpage of results.
examinevar(
x,
invar = "",
catch = "catch",
effort = "hours",
cpue = "cpue",
year = "year",
spsname = "",
rundir,
runname,
addlines = 5,
wid = 6,
hgt = 5,
textcex = 0.75,
category = invar
)
x |
the data.frame of fishery dependent data |
invar |
the name of the variable or factor whose properties are to be examined |
catch |
the name used to identify the catch factor of the species |
effort |
the name used to identify the effort factor of the species |
cpue |
the name used to identify the cpue factor of the species |
year |
the name used to identify the year factor of the species |
spsname |
the name of the species of interest. |
rundir |
the full path of the results directory into which the plot files and the .csv files for the tables are to be stored. |
runname |
the name of the particular run being made |
addlines |
the number of lines to be added at the top of the plots, so The year totals can be included. Default=5, the number needed will depend on how many unique values there are for 'invar'. If there are many then more lines may need to be added to space out the year totals. |
wid |
the width of each plot, default=6 |
hgt |
the height of each plot, default=5 |
textcex |
what text size to use in the plots, default=0.75 |
category |
default = invar, but can be changed if required |
nothing but it does generate 4 plots and 2 tables into rundir
print("wait on internal data")
# x=ab;invar="block";spsname="blacklip";rundir=rundir;runname="zone"
# catch="catch";effort="hours";cpue="cpue";year="year";addlines=3;wid=6;hgt=5;category=invar
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.