View source: R/brapi_put_variables_observationVariableDbId.R
brapi_put_variables_observationVariableDbId | R Documentation |
Update an existing Observation Variable
brapi_put_variables_observationVariableDbId( con = NULL, observationVariableDbId = "", 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 |
observationVariableDbId |
character; required: TRUE; Unique database id, which identifies the variable to be updated. |
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
. 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. 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. The
|
Update an existing Observation Variable
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_post_variables()
,
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()
Other Observation Variables:
brapi_get_search_variables_searchResultsDbId()
,
brapi_get_variables_observationVariableDbId()
,
brapi_get_variables()
,
brapi_post_search_variables()
,
brapi_post_variables()
## 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") ## POST /variables to add a new variable out <- 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, submissionTimestamp = submissionTimestamp, synonyms = synonyms, trait = trait) ## Obtain the observationVariableDbId of the new variable observationVariableDbId <- unique(out$observationVariableDbId) methodDbId <- unique(out$method.methodDbId) scaleDbId <- unique(out$scale.scaleDbId) traitDbId <- unique(out$trait.traitDbId) ## Update the information of the new observation variable brapi_put_variables_observationVariableDbId( con = con, observationVariableDbId = observationVariableDbId, additionalInfo = list( dummyData = "TRUE", example = "put_variables_observationVariableDbId"), commonCropName = "Paw Paw", method = list( # update method methodDbId = methodDbId, methodName = "Root finding discriminant"), scale = list( # replace scale scaleDbId = "scale_variable2")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.