parse_observations {Xcertainty} | R Documentation |
Photogrammetric data are often recorded in a wide-format data.frame
,
in which each row contains all measurement information for a single animal.
The row contains the image information (i.e., observed altitude and sensor
information) as well as all measurements for a given subject. This function
parses the wide-format data into a normalized list
of
data.frame
objects that separately describe the image and measurement
data. This function can process observations of calibration data as well as
experimental data.
parse_observations(
x,
subject_col,
meas_col,
tlen_col = NULL,
image_col,
barometer_col = NULL,
laser_col = NULL,
flen_col,
iwidth_col,
swidth_col,
uas_col,
timepoint_col = NULL,
alt_conversion_col = NULL
)
x |
Wide-format |
subject_col |
column name in |
meas_col |
character vector of column names in |
tlen_col |
column name in |
image_col |
column name in |
barometer_col |
column name in |
laser_col |
column name in |
flen_col |
column name in |
iwidth_col |
column name in |
swidth_col |
column name in |
uas_col |
column names in |
timepoint_col |
column name in |
alt_conversion_col |
if not |
outputs a list with four elements:
a tibble containing the measurements in pixels linked with Subject, Measurement description, Image, and the Timepoint
a tibble containing the Subject, Measurement, Length, and Timepoint. NULL if no training objects were included
a tibble containing the Subject, Measurement, and Timepoint. NULL if no prediction data included
a tibble containing the Image, Barometer, Laser, FocalLength, ImageWidth, SensorWidth, and UAS
# load example wide-format data
data("calibration")
data("whales")
# parse calibration study
calibration_data = parse_observations(
x = calibration,
subject_col = 'CO.ID',
meas_col = 'Lpix',
tlen_col = 'CO.L',
image_col = 'image',
barometer_col = 'Baro_Alt',
laser_col = 'Laser_Alt',
flen_col = 'Focal_Length',
iwidth_col = 'Iw',
swidth_col = 'Sw',
uas_col = 'uas'
)
# parse field study
whale_data = parse_observations(
x = whales,
subject_col = 'whale_ID',
meas_col = 'TL.pix',
image_col = 'Image',
barometer_col = 'AltitudeBarometer',
laser_col = 'AltitudeLaser',
flen_col = 'FocalLength',
iwidth_col = 'ImageWidth',
swidth_col = 'SensorWidth',
uas_col = 'UAS',
timepoint_col = 'year'
)
# combine parsed calibration and observation (whale) data
combined_data = combine_observations(calibration_data, whale_data)