Get a table of trait measurements from YouTheria

Share:

Description

Retrieves a data.frame of trait measurements with facilities to select by location, species name and/or measurement type.

Usage

1
2
3
4
getMeasurementData(measurementType = NA, MSW93Binomial = NA,
  MSW05Binomial = NA, country = NULL, StudyUnitId = NULL,
  locationData = TRUE, locationOnly = FALSE, cast = TRUE,
  silent = FALSE)

Arguments

measurementType

Measurement types to collect data for. If NULL (default), all measurement types are returned. Can also be 'numeric' or 'character' (or a list of either type) and will filter by MeasurementTypeID and the measurement respectivly. MeasurementTypeIDs and names can be found using getMeasurementTypes().

MSW93Binomial

Character giving the latin name of a species (or list of species) for which measurements are required. Naming should follow Mammal Species of the World 1993.

MSW05Binomial

Character giving the latin name of a species (or list of species) for which measurements are required. Naming should follow Mammal Species of the World 2005.

country

Character specifying the country from which you wish to collect data. If NULL all data is retrieved. If specified then locationOnly is set to TRUE

StudyUnitId

Numeric specifying the StudyUnitId from which you wish to collect data. If NULL all data is retrieved

locationData

Logial dictating whether location information should be added to the output. Defualt is FALSE but is set to TRUE if either StudyUnitId or country are specified.

locationOnly

If TRUE data is only be returned if it has location information.

cast

If TRUE (default) then the data is cast so that each observation is one row in the output. If false then each observation has one row for each data element recorded (i.e. range, mean, units, etc)

silent

If TRUE progress reporting is silenced

Value

A data.frame with each row giving a trait measurement

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
# Select measurement type by id
M14 <- getMeasurementData(14)
M22_7_2 <- getMeasurementData(c(22,7,2))

# Select measurement type by name
WM <- getMeasurementData('Wing Morphology')
WM_TN <- getMeasurementData(c('Wing Morphology','Teat Number'))

# Select by measurement type and species name
PpPr_bodymass <- getMeasurementData(measurementType = 1,
                                    MSW93Binomial = c('Pongo pygmaeus','Peroryctes raffrayana'))
                   
#Select by measurement type, species name and location
Ob_Activity_Tanz <- getMeasurementData(measurementType = 'Activity Cycle',
                                       MSW05Binomial = 'Oryx beisa',
                                       country = 'Tanzania')

## End(Not run)