#' @title validations Char
#' @name ValidateCharacter
#' @param configFile configFile
#' @description App to start geoapp
#'
#' @import XML
#' @return configFile
#'
#' @author Alberto RodrÃguez Izquierdo, 2021
validateCharacter <- function(configFile){
if (!is.null(configFile)){
if(configFile == "TRUE"){
configFile <- TRUE
}else if(configFile == "FALSE"){
configFile <- FALSE
}
}
return(configFile)
}
#' @title Validations Number
#' @name ValidateNumber
#' @param configFile configFile
#' @description App to start geoapp
#'
#' @import XML
#' @return configFile
#'
#' @author Alberto RodrÃguez Izquierdo, 2021
validateNumber <- function(configFile){
# Error <- FALSE
if (is.null(configFile)){
# log_error <- paste0('Value ', configFile, ' is null. Please check configFile')
# logerror(log_error)
print('Warning: Node is null')
# Error <- TRUE
}else if (!as.numeric(configFile)){
# log_error <- paste0('Value ', configFile, ' is not a number. Please check configFile')
# logerror(log_error)
print('Warning: Node is not numeric char')
# Error <- TRUE
}else{
configFile <- as.numeric(configFile)
# if (any(Error == TRUE)){
# error <- Error
# stop('Not possible to validate, please check configFile format')
# }
}
return(configFile)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.