calcErr: Calculate photograph and measurer errors

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/calcErr.R

Description

Calculate photograph error and measurer error from a sample of images

Usage

1
calcErr(data = data, imageID = "imageID", animalID = "animalID", weights = FALSE)

Arguments

data

A dataframe containing image file name, animal ID, and each images' associated measurements.

imageID

A character providing the column name of the column identifying the name of each image. In most cases, this is the file name.

animalID

A character providing the column name of the column identifying animal ID for each image.

weights

Logical. Indicating whether weights should be calculated. For use in weights for lpic().

Details

calErr() identifies SD and weights (if desired) for use in lpic(). For SD, or the calculation of photograph error, a database of multiple images taken of multiple animals is provided. For weight, or the calculation of measurer error, a database of measurements of the same images from multiple animals is provided.

The function also calculates the grand mean, based on imageID as a stratum.

Value

A dataframe with measurement name, grand mean, SD, and weight (if specified) is returned.

Author(s)

Jerod A. Merkle (jerod.merkle.1@ulaval.ca)

See Also

lpic

Examples

1
2
3
4
5
6
7
8
9
#generate some random image data
data <- data.frame(imageID=paste("f", 1:12, sep = ""), 
                   animalID=rep(1:3, times=4), m1=rnorm(12, 5, 2),
                   m2=rnorm(12, 8, 1), m3=rnorm(12, 20, 5))
#to find SD or photograph error for each measurement
calcErr(data)
#to find weight or measurer error for each measurement
#note, multple measurements of the same image must be supplied.
test <- calcErr(data, weights = TRUE)

MatchImage documentation built on May 2, 2019, 4:51 p.m.