View source: R/brapi_post_variables.R
brapi_post_variables | R Documentation |
Add new Observation Variables
brapi_post_variables( con = NULL, additionalInfo = list(), commonCropName = "", contextOfUse = "", defaultValue = "", documentationURL = "", externalReferences = "", growthStage = "", institution = "", language = "", method = list(), observationVariableName = "", ontologyReference = list(), scale = list(), scientist = "", status = "", submissionTimestamp = "", synonyms = "", trait = list() )
con |
list; required: TRUE; BrAPI connection object |
additionalInfo |
list; required: FALSE; Additional arbitrary information. If provided use the following construct list(additionalProp1 = "string", additionalProp2 = "string", additionalProp3 = "string"). The Examples section shows an example on how to construct the
|
commonCropName |
character; required: FALSE; Common name for the crop associated with the observation variable. |
contextOfUse |
vector of type character; required: FALSE; Indication of how trait is routinely used; default: "", when using multiple values supply as c("value1", "value2")., e.g. c( "Trial evaluation", "Nursery evaluation"). |
defaultValue |
character; required: FALSE; Variable default value, e.g. "red", "2.3", etc. |
documentationURL |
character; required: FALSE; A URL to the human readable documentation of this object. |
externalReferences |
data.frame; required: FALSE; A data.frame of
external reference ids. These are references to this piece of data in an
external system. Could be a simple string or a URI. The
The Examples section shows an example of how to construct the
|
growthStage |
character; required: FALSE; Growth stage at which measurement is made, e.g. "flowering". |
institution |
character; required: FALSE; Name of institution submitting the variable. |
language |
character; required: FALSE; 2 letter ISO 639-1 code for the language of submission of the variable, e.g. en. |
method |
list; required: FALSE; Method used for the observation variable . Either specify:
or create a new method by specifying (will generate the
|
observationVariableName |
character; required: FALSE; Variable name (usually a short name). |
ontologyReference |
list; required: FALSE; MIAPPE V1.1 (DM-85) Variable accession number - Accession number of the variable in the Crop Ontology. (DM-87) Trait accession number - Accession number of the trait in a suitable controlled vocabulary (Crop Ontology, Trait Ontology). (DM-89) Method accession number - Accession number of the method in a suitable controlled vocabulary (Crop Ontology, Trait Ontology). (DM-93) Scale accession number - Accession number of the scale in a suitable controlled vocabulary (Crop Ontology). The
The Examples section shows an example of how to construct the
|
scale |
list; required: FALSE; Scale metadata used for the observation variable. Either specify:
or create a new scale by specifying (will generate the
|
scientist |
character; required: FALSE; Name of scientist submitting the variable. |
status |
character; required: FALSE; Variable status, examples: "recommended", "obsolete", "legacy", etc. |
submissionTimestamp |
character; required: FALSE; The date and time when the variable was added. Coded in the ISO 8601 standard extended format, where date, time and time zone information needs to be provided (check for example https://www.w3.org/TR/NOTE-datetime). |
synonyms |
vector of type character; required: FALSE; Other variable names; default: "", when using multiple values supply as c( "value1", "value2"). |
trait |
list; required: FALSE; Trait metadata used for the observation variable. Either specify:
or create a new trait by specifying (will generate the
|
Add a new Observation Variables to the system.
data.frame
Maikel Verouden
Other brapi-phenotyping:
brapi_get_events()
,
brapi_get_images_imageDbId()
,
brapi_get_images()
,
brapi_get_methods_methodDbId()
,
brapi_get_methods()
,
brapi_get_observationlevels()
,
brapi_get_observations_observationDbId()
,
brapi_get_observations_table()
,
brapi_get_observations()
,
brapi_get_observationunits_observationUnitDbId()
,
brapi_get_observationunits_table()
,
brapi_get_observationunits()
,
brapi_get_ontologies()
,
brapi_get_scales_scaleDbId()
,
brapi_get_scales()
,
brapi_get_search_images_searchResultsDbId()
,
brapi_get_search_observations_searchResultsDbId()
,
brapi_get_search_observationunits_searchResultsDbId()
,
brapi_get_search_variables_searchResultsDbId()
,
brapi_get_traits_traitDbId()
,
brapi_get_traits()
,
brapi_get_variables_observationVariableDbId()
,
brapi_get_variables()
,
brapi_post_images()
,
brapi_post_methods()
,
brapi_post_observations()
,
brapi_post_observationunits()
,
brapi_post_scales()
,
brapi_post_search_images()
,
brapi_post_search_observations()
,
brapi_post_search_observationunits()
,
brapi_post_search_variables()
,
brapi_post_traits()
,
brapi_put_images_imageDbId_imagecontent()
,
brapi_put_images_imageDbId()
,
brapi_put_methods_methodDbId()
,
brapi_put_observations_observationDbId()
,
brapi_put_observationunits_observationUnitDbId()
,
brapi_put_scales_scaleDbId()
,
brapi_put_traits_traitDbId()
,
brapi_put_variables_observationVariableDbId()
Other Observation Variables:
brapi_get_search_variables_searchResultsDbId()
,
brapi_get_variables_observationVariableDbId()
,
brapi_get_variables()
,
brapi_post_search_variables()
,
brapi_put_variables_observationVariableDbId()
## Not run: con <- brapi_db()$testserver con[["token"]] <- "YYYY" additionalInfo <- list(dummyData = "TRUE", example = "post_variables") commonCropName <- "Tomatillo" contextOfUse <- c("Trial evaluation", "Nursery evaluation") defaultValue <- "2.0" documentationURL <- "https://wiki.brapi.org/documentation.html" externalReferences <- data.frame(referenceID = c("doi:10.155454/12341234", "http://purl.obolibrary.org/obo/ro.owl", "75a50e76"), referenceSource = c("DOI", "OBO Library", "Remote Data Collection Upload Tool")) growthStage <- "flowering" institution <- "The BrAPI Institute" language <- "en" ## Use an existing method # method <- list(methodDbId = "method_variabble1") ## Or create a new method (automatically adds a methodDbId) method <- list( additionalInfo = list(dummyData = "TRUE", example = "post_variables add method"), bibliographicalReference = "Smith, 1893, Really Cool Paper, Popular Journal", description = "Discriminant for root finding of quadratic functions", externalReferences = data.frame( referenceID = c("doi:10.155454/12341234", "http://purl.obolibrary.org/obo/ro.owl", "75a50e76"), referenceSource = c("DOI", "OBO Library", "Remote Data Collection Upload Tool")), formula = "b^2 - 4ac", methodClass = "Computation", methodName = "Discriminant", ontologyReference = list( documentationLinks = data.frame( URL = c("http://purl.obolibrary.org/obo/ro.owl", "https://en.wikipedia.org/wiki/Method"), type = c("OBO", "WEBPAGE")), ontologyDbId = "ontology_attribute1", ontologyName = "Ontology.org", version = "17")) observationVariableName <- "Variable Name" ontologyReference <- list( documentationLinks = data.frame( URL = c("http://purl.obolibrary.org/obo/ro.owl", "https://en.wikipedia.org/wiki/Variable"), type = c("OBO", "WEBPAGE")), ontologyDbId = "ontology_variable1", ontologyName = "Ontology.org", version = "17") ## Use an existing scale # scale <- list(scaleDbId = "scale_variabble1") ## Or create a new scale (automatically adds a scaleDbId) scale <- list( additionalInfo = list(dummyData = "TRUE", example = "post_variables add scale"), dataType = "Numerical", decimalPlaces = 2, externalReferences = data.frame( referenceID = c("doi:10.155454/12341234", "http://purl.obolibrary.org/obo/ro.owl", "75a50e76"), referenceSource = c("DOI", "OBO Library", "Remote Data Collection Upload Tool")), ontologyReference = list( documentationLinks = data.frame( URL = c("http://purl.obolibrary.org/obo/ro.owl", "https://en.wikipedia.org/wiki/Scale"), type = c("OBO", "WEBPAGE")), ontologyName = "Ontology.org", version = "17"), scaleName = "Meters", validValues = list( categories = data.frame( label = c("low", "medium", "high"), value = c("0", "5", "10")), max = 9999, min = 2)) scientist <- "Dr. Bob Robertson" status <- "recommended" submissionTimestamp <- "2021-09-18T10:56:10.855Z" synonyms <- c("Tomatillo Height", "Stalk Height") ## Use an existing trait # trait <- list(traitDbId = "trait_variabble1") ## Or create a new trait (automatically adds a traitDbId) trait <- list( additionalInfo = list(dummyData = "TRUE", example = "post_variables add trait"), alternativeAbbreviations = c("PHght", "Hght"), attribute = "height", entity = "plant", externalReferences = data.frame( referenceID = c("doi:10.155454/12341234", "http://purl.obolibrary.org/obo/ro.owl", "75a50e76"), referenceSource = c("DOI", "OBO Library", "Remote Data Collection Upload Tool")), mainAbbreviation = "PH", ontologyReference = list( documentationLinks = data.frame( URL = c("http://purl.obolibrary.org/obo/ro.owl", "https://www.cropontology.org/terms/CO_323:0000024/"), type = c("OBO", "WEBPAGE")), ontologyDbId = "ontology_variable1", ontologyName = "Ontology.org", version = "17"), status = "recommended", synonyms = c("Height", "Plant Height", "Stalk Height", "Canopy Height"), traitClass = "agronomical", traitDescription = "The height of plant from ground to top part", traitName = "Plant height") ## Add the new variable brapi_post_variables(con = con, additionalInfo = additionalInfo, commonCropName = commonCropName, contextOfUse = contextOfUse, defaultValue = defaultValue, documentationURL = documentationURL, externalReferences = externalReferences, growthStage = growthStage, institution = institution, language = language, method = method, observationVariableName = observationVariableName, ontologyReference = ontologyReference, scale = scale, scientist = scientist, status = status, submissionTimestamp = submissionTimestamp, synonyms = synonyms, trait = trait) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.