check.RS <- function(io){
# Preliminaries
if(class(io) != "InputOutput") stop('io should be of "InputOutput" class. See ?as.inputoutput')
RS_label <- io$RS_label
regions <- unique(RS_label[, 1])
RS.1 <- RS_label[RS_label[, 1] == regions[1],]
the.same <- "yes"
for(r in 2:length(regions)){
i <- which(RS_label[, 1] == regions[r])
if(!all(RS.1[, 2] == RS_label[i, 2])){
the.same <- "no"
}
}
if(the.same == "yes"){
return(TRUE)
} else{
return(FALSE)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.