View source: R/defineOrdinalScaleMethod.R
defineOrdinalScaleMethod | R Documentation |
A general function to define a method for measurements in an ordinal scale of a given subject.
defineOrdinalScaleMethod( name, description, subject, codes, citationString = "", DOI = "", quantifiableCodes = character(0), breaks = NULL, midPoints = NULL, definitions = NULL )
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 |
quantifiableCodes |
A string vector with the subset of |
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. |
an object of class VegXMethodDefinition
Other define measurement functions:
defineQualitativeScaleMethod()
,
defineQuantitativeScaleMethod()
,
predefinedMeasurementMethod()
#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%"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.