Commit 13432d82 authored by Facundo Muñoz's avatar Facundo Muñoz ®️
Browse files

merge contributions

Merge branch 'interface_v2' of github.com:Cirad-ASTRE/mapMCDA into interface_v2

# Conflicts:
#	inst/interface/global.R
parents 605336dc 6c334642
......@@ -49,8 +49,16 @@ langDF <- data.frame(
"BoxUnitStat" = c("Statistics", "Statistiques"),
# Risk factors box
<<<<<<< HEAD
"BoxRiskRawMap" = c("Original scale", "Échelle originale"),
"BoxRiskStandRaster" = c("Risk scale", "Échelle de risque"),
||||||| merged common ancestors
"BoxRiskRawMap" = c("Raw", "Brut"),
"BoxRiskStandRaster" = c("Standardized raster", "Raster standardisé"),
=======
"BoxRiskRawMap" = c("Original scale", "Echelle originale"),
"BoxRiskStandRaster" = c("Risk scale", "Echelle de risque"),
>>>>>>> 6c334642e14d50f808958cbec9df7c5bd190a662
"ABRiskRasterInvert" = c("Invert", "Inverser"),
"RBRiskLayer" = c("Scale risk factors",
"Mise en échelle des facteurs de risque"),
......
......@@ -135,30 +135,38 @@ server <- function(input, output, session) {
# Load layers
layerFiles$name <- as.character(layerFiles$name)
nbFiles <- nrow(layerFiles)
tempLayer <- vector("list", nbFiles) # pre-allocate
for(k in 1:nbFiles){
tempLayer[[k]] <- load_layer(layerFiles[k, "datapath"])
}
# Remove NULL layers
indRem <- which(sapply(tempLayer, is.null))
nbFiles <- nrow(layerFiles)
if(!is.na(indRem[1])){
tempLayer <- tempLayer[-indRem]
layerFiles$isNull <- rep(FALSE, nbFiles)
acceptedFiles <- layerFiles[-indRem,]
tempLayer <- list()
} else {
indList <- 0
for(k in 1:nbFiles){
acceptedFiles <- layerFiles
myLayer <- load_layer(layerFiles[k, "datapath"])
if(is.null(myLayer)){
layerFiles[k, "isNull"] <- TRUE
} else {
indList <- indList + 1
tempLayer[[indList]] <- myLayer
}
}
indRem <- which(layerFiles$isNull==TRUE)
acceptedFiles <- layerFiles[-indRem,]
nbLayer <- nrow(acceptedFiles)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment