RFBCoptions {RFishBC} | R Documentation |
See or set arguments for common RFishBC functions
Description
The digitizeRadii
and showDigitizedImage
functions have a variety of arguments that create great flexibility. Default values for these arguments can be seen with this function.
Additionally, a user may want to change a number of these arguments from their default values and use those new values in a large number of function calls (e.g., processing a larger number of structures with the same characteristics). Changing the argument values from the defaults during each function call is inefficient. Thus, default values for these arguments may be changed for the SESSION with this function.
Usage
RFBCoptions(reset = FALSE, ...)
Arguments
reset |
A logical that will reset the values to their “factory-fresh” defaults if |
... |
An arbitrary number of |
Details
The arguments that can be set with this function are:
reading
:A single character string (or an object that can be coerced to a character) that identifies the reading for a structure. If the structure will be read multiple times, then this may be used to specify the particular reading. Defaults to
NULL
. Used indigitizeRadii
.description
:A single character string that contains a short (but more detailed than in
reading
) description for a reading of a structure. Defaults toNULL
. Used indigitizeRadii
.suffix
:A single character string that will be added to the RData file name. If
NULL
andreading
is notNULL
, then this will be replaced with the value inreading
. Defaults toNULL
. Used indigitizeRadii
.edgeIsAnnulus
:A single logical that indicates whether the structure margin should be considered an annulus (
TRUE
) or not (FALSE
). UseFALSE
if growth between the last annulus and the structure margin is not a complete year's worth of growth (i.e., “plus-growth”). Defaults toNULL
which means that the user must set this value. Used indigitizeRadii
.windowSize
:A single numeric used to set the size of the largest dimension for the window in which the structure image is opened. This size will be the width for wider images and the height for taller images. The other dimension will be set relative to this so that the image is displayed in its native aspect ratio. Defaults to 7 inches. Used in
digitizeRadii
andfindScalingFactor
.deviceType
:A single character that identifies the type of graphic device in which the image will be shown. Defaults to
deviceType="windows"
which should be used with a Windows OS, but can be set todeviceType="X11"
which should be used with a Mac OS.popID
:A single logical that indicates if the fish ID dialog box (only on Windows if no
ID
is given indigitizeRadii
) is populated with a guess at the fish ID. The guess is from using the pattern inIDpattern
(see below) on the image file name sans the extension. This may be useful for when the image name contains the fish ID (and no other numbers). Defaults toTRUE
. Used indigitizeRadii
.IDpattern
:A single regular expression that indicates how to extract a possible fish ID from an image file name. Defaults to selecting all characters after the last underscore in the image file name (sans extension). Used in
digitizeRadii
andgetID
.IDreplace
:A string to replace the expression matched in
IDpattern
. Used indigitizeRadii
andgetID
.scalingFactor
:A single numeric used to convert measurements on the structure image to actual measurements on the structure. Measurements on the structure image will be multiplied by this value. Ignored if
scaleBar=TRUE
. Defaults to1
. Used indigitizeRadii
.scaleBar
:A single logical that indicates whether the user will be prompted to select the endpoints of a scale-bar on the structure image. If
TRUE
, then must also usescaleBarLength
. IfFALSE
, then consider usingscalingFactor
. Defaults toFALSE
. Used indigitizeRadii
.scaleBarLength
:A single numeric that represents the actual length of the scale-bar. Ignored if
scaleBar=FALSE
. Defaults toNULL
; thus, the user must enter a value ifscaleBar=TRUE
. Used indigitizeRadii
.scaleBarUnits
:A single character that represents the units of measurement for the actual length of the scale-bar. Ignored if
scaleBar=FALSE
. Defaults toNULL
; thus, the user must enter a value ifscaleBar=TRUE
. Used indigitizeRadii
.col.scaleBar
:The color of the scale-bar line if
scalebar=TRUE
. Defaults to"yellow"
. Used indigitizeRadii
,showDigitizedImage
, andfindScalingFactor
.lwd.scaleBar
:The line width of the scale-bar line if
scalebar=TRUE
. Defaults to2
. Used indigitizeRadii
,showDigitizedImage
, andfindScalingFactor
.showScaleBarLength
:A single logical that indicates whether the length of the scale-bar line should be shown on the image. Used in
showDigitizedImage
.makeTransect
:A single logical that indicates whether a transect between the points selected at the structure center and margin should be made. Defaults to
TRUE
. Used indigitizeRadii
.snap2Transect
:A single logical that indicates whether the coordinates of the selected points that represent annuli should be moved to fall exactly on the transect from the structure center to margin. If
TRUE
then the points will be moved perpendicularly to the transect (and the original user-selected point will not be seen on the image). IfFALSE
then the points will be where the user selected them. Defaults toTRUE
. Used indigitizeRadii
.col.transect
:The color of the transect line if
makeTransect=TRUE
indigitizeRadii
. Defaults to"cyan"
.lwd.transect
:The width of the transect line if
makeTransect=TRUE
indigitizeRadii
. Defaults to2
.connect
:A single logical that indicates whether the selected points should be connected with a line. Defaults to
TRUE
. Used inshowDigitizedImage
.col.connect
:The color of the connecting line if
connect=TRUE
inshowDigitizedImage
. Defaults to"cyan"
.lwd.connect
:The width of the connecting line if
connect=TRUE
inshowDigitizedImage
. Defaults to2
.pch.sel
:The plotting character of points for selected annuli in
digitizeRadii
. Defaults to20
(a small solid circle).col.sel
:The color of points for selected annuli in
digitizeRadii
. Defaults to"yellow"
.cex.sel
:The character expansion value of points for selected annuli in
digitizeRadii
. Defaults to1
.pch.del
:The plotting character of points for DEselected annuli in
digitizeRadii
. Defaults to13
(a circle with an X in it).col.del
:The color of points for DEselected annuli in
digitizeRadii
. Defaults to"red"
.pch.show
:The plotting character for points shown in
showDigitizedImage
. Defaults to19
(a solid circle).col.show
:The color of points shown in
showDigitizedImage
. Defaults to"yellow"
.cex.show
:The character expansion value of points shown in
showDigitizedImage
. Defaults to1
.showInfo
:A single logical that indicates whether the ID information should be shown on the image in
digitizeRadii
. Defaults toTRUE
.pos.info
:A single character that indicates where the ID information should be placed when
showInfo=TRUE
. Seelegend
for position choices. Defaults to"topleft"
. Used indigitizeRadii
.cex.info
:The character expansion for the ID information when
showInfo=TRUE
. Defaults to1.2
Used indigitizeRadii
.col.info
:The color for the ID information when
showInfo=TRUE
. Defaults to"yellow"
. Used indigitizeRadii
.showAnnuliLabels
:A single logical that indicates whether annulus labels should be shown on the image from
showDigitizedImage
. Defaults toTRUE
, but is ignored if more than one set of annuli will be plotted.annuliLabels
:A numeric vector that indicates the numbers for which annuli should be labeled when
showAnnuliLabels=TRUE
. Defaults toNULL
which indicates that all annuli should be labeled. Used inshowDigitizedImage
.col.ann
:The color of the annuli number text when
showAnnuliLabels=TRUE
inshowDigitizedImage
. Defaults to"yellow"
.cex.ann
:The character expansion value of the annuli number text when
showAnnuliLabels=TRUE
inshowDigitizedImage
. Defaults to1.2
.offset.ann
:A numeric value that specifies the offset (in proportions of a character width) of the annuli labels from the point when
showAnnuliLabels=TRUE
inshowDigitizedImage
. Defaults to0.5
.addNote
:A logical for whether the user can add or will be prompted to add a special note to the RData file when using
digitizeRadii
. Example notes may indicate that the image was poor, some annuli were suspect, or the image should be re-read.
The user will likely only use this function to change arguments at the start of a script, so that those values will be used throughout the analyses in the script. If the values for the arguments need to be changed in any instance of digitizeRadii
or showDigitizedImage
, then it is more efficient to change the argument within the call to those functions.
The argument values can be reset to the original defaults by using reset=TRUE
. See examples.
Value
None, but the list in RFBCoptions
will be modified.
Author(s)
Derek H. Ogle, DerekOgle51@gmail.com
See Also
digitizeRadii
and showDigitizedImage
Examples
## Show all options
RFBCoptions()
## Show how to see and set one option
RFBCoptions()$makeTransect
RFBCoptions(makeTransect=FALSE)
RFBCoptions()$makeTransect
RFBCoptions(reset=TRUE)
RFBCoptions()$makeTransect
## Multiple options can also be set at once
RFBCoptions(pch.show=3,col.show="blue",cex.show=3)