R/read_reshape_wplus.R

Defines functions read_reshape_wplus

Documented in read_reshape_wplus

#' @title Read and reshape (w+) for publishing
#'
#' @description Read wplus table from Qgis and reshape them for automated repports
#'
#' @param wplus_path  file path where table are stored
#'
#' @return a list object
#'
#' @import dplyr
#' @export


read_reshape_wplus <- function(wplus_path){

  listtable <- list.files(path = wplus_path)

  alltables <- list()
  for (mytable in listtable){
    tmptable <- read.csv(paste(wplus_path, mytable,sep=""), sep=";")
    cols <- ncol(tmptable)
    tmptable <- tmptable[,c(cols, seq(2:(cols-5)))] %>%
      arrange(Class)

    alltables[[mytable]] <- tmptable
  }
  return(alltables)

}
MelodyPremaillon/valwoe documentation built on April 16, 2022, 12:46 a.m.