Project

General

Profile

« Previous | Next » 

Revision d094f2ca

Added by Benoit Parmentier over 8 years ago

adding variables to plot RMSE by tiles summary over 30 years

View differences:

climate/research/oregon/interpolation/global_run_scalingup_assessment_part3.R
243 243

  
244 244
  ## Step 2: only read what is necessary at this stage...
245 245
  list_tb <- lapply(list_tb_fname,function(x){read.table(x,stringsAsFactors=F,sep=",")})
246
  
247
  list_tb_updated <- mclapply(list_tb,FUN=adding_tile_nb_fun,mc.preschedule=FALSE,mc.cores = num_cores,num_cores_tmp=1)
248

  
249
  
250
  adding_tile_nb_fun <- function(x,num_cores_tmp){
251
    x$tile_id <- factor(x$tile_id, levels=unique(mixedsort(x$tile_id)))#fix level ordering for plotting
252
    #num_cores_tmp <- 1
253
    x$tile_nb <- unlist(mclapply(as.character(x$tile_id),FUN=function(y){strsplit(y,"_")[[1]][2]},mc.preschedule=FALSE,mc.cores = num_cores_tmp))
254
    return(x)
255
  }
256
  #tb$tile_id <- factor(tb$tile_id, levels=unique(mixedsort(tb$tile_id)))#fix level ordering for plotting
257
  #fix level ordering for plotting
258
  #tb$tile_nb <- unlist(mclapply(as.character(tb$tile_id),FUN=function(x){strsplit(x,"_")[[1]][2]},mc.preschedule=FALSE,mc.cores = num_cores))
259
  #unlist(mclapply(as.character(tb$tile_id[1:10]),FUN=function(x){strsplit(x,"_")[[1]][2]},mc.preschedule=FALSE,mc.cores = num_cores))
246 260

  
247 261
  tb <- do.call(rbind,list_tb)
248 262
  list_tb_s <- lapply(list_tb_s_fname,function(x){read.table(x,stringsAsFactors=F,sep=",")})

Also available in: Unified diff