getMeasurements: Get simple shape variables, filtered according to filter

View source: R/shapeR.R

getMeasurementsR Documentation

Get simple shape variables, filtered according to filter

Description

Returns shape variables length, width, perimeter and area determined in generateShapeCoefficients. Returns only values as set in the slot filter. These variables can only be obtained if the calibration measurements in pixels have been registered in the csv data file in a column labelled 'cal' (see example data file). To get the calibration measurements, use a image manipulation program and measure 1mm on the calibration measurement stick (that was taken for that particular dataset) and register how many pixels 1mm is into the column 'cal'.

Usage

getMeasurements(object)

Arguments

object

shapeR object

Value

A data frame with all valid fish as determined by the slot filter and with columns:

  • otolith.area

  • otolith.length

  • otolith.width

  • otolith.perimeter

Author(s)

Lisa Anne Libungan

Examples

data(shape)
# Calculate the mean otolith area for each fish population
# The results are in square mm since the calibration ('cal') column
# in the data file is in pixels (1 mm/pixel).
tapply(getMeasurements(shape)$otolith.area, getMasterlist(shape)$pop,mean)

shapeR documentation built on Nov. 22, 2022, 1:07 a.m.