defineOrdinalScaleMethod: Ordinal scale method definition

View source: R/defineOrdinalScaleMethod.R

defineOrdinalScaleMethodR Documentation

Ordinal scale method definition

Description

A general function to define a method for measurements in an ordinal scale of a given subject.

Usage

defineOrdinalScaleMethod(
  name,
  description,
  subject,
  codes,
  citationString = "",
  DOI = "",
  quantifiableCodes = character(0),
  breaks = NULL,
  midPoints = NULL,
  definitions = NULL
)

Arguments

name

String with the name of the method.

description

String describing the method.

subject

A string to identify the subject (e.g. 'plant cover').

codes

A character vector of ordinal class codes.

citationString

A string with the bibliographic reference for the method.

DOI

A string with the DOI the resource related to citationString.

quantifiableCodes

A string vector with the subset of codes that have correspondence in a quantitative scale. These codes can be transformed to midPoints (if supplied in midPoints) and, correspondingly, codes in the quantitative scale can be transformed to ordinal codes using class limits (if supplied in breaks).

breaks

A vector of break points (for ordinal scales with class limits)

midPoints

A vector of class midpoints (for ordinal scales that can be translated into quantitative values)

definitions

A character vector of class definitions.

Value

an object of class VegXMethodDefinition

See Also

Other define measurement functions: defineQualitativeScaleMethod(), defineQuantitativeScaleMethod(), predefinedMeasurementMethod()

Examples


#Ordinal scale with three levels
defineOrdinalScaleMethod("scale1", "Description for scale1", "subject1",
                   codes = c("first", "second","third"))

#Braun-Blanquet plant cover scale with five levels that can be translated to cover codes
defineOrdinalScaleMethod(name = "Braun-Blanquet",
                   description = "Five-level Braun-Blanquet cover scale",
                   subject = "plant cover",
                   codes = as.character(1:5),
                   quantifiableCodes = as.character(1:5),
                   breaks = c(0,5,25,50,75,100),
                   midPoints = c(2.5,17.5, 37.5, 62.5, 87.5))


#Ordinal plant cover scale with seven levels where six can be translated to a quantitative scale
defineOrdinalScaleMethod(name = "Recce cover scale",
                   description = "Recce recording method by Hurst/Allen",
                   subject = "plant cover",
                   citation = "Hurst, JM and Allen, RB. (2007) 
                        The Recce method for describing New Zealand vegetation – Field protocols. 
                        Landcare Research, Lincoln.",
                   codes = c("P","1","2","3", "4", "5", "6"),
                   quantifiableCodes = c("1","2","3", "4", "5", "6"),
                   breaks = c(0, 1, 5, 25, 50, 75, 100),
                   midPoints = c(0.05, 0.5, 15, 37.5, 62.5, 87.5),
                   definitions = c("Presence", "<1%", "1-5%","6-25%", "26-50%", 
                                   "51-75%", "76-100%"))


miquelcaceres/VegX documentation built on Sept. 18, 2022, 7:04 p.m.