Commit dc07071e authored by Helmer Belbo's avatar Helmer Belbo
Browse files

Adding kommunevis() function to gather kommunevis data

parent ee84cfb6
# Generated by roxygen2: do not edit by hand
export(fylkesvis_mnd)
export(kommunevis)
......@@ -21,3 +21,25 @@ fylkesvis_mnd = function(){
}
#' Kommunevis vsop
#'
#' @return a tibble with logging statistics
#' @param Behøver ingen parametere. Datafilene ligger i egen folder.
#' @export
#'
#' @examples devtools::install_github("hbelbo/vsop")
#' kommunevis()
kommunevis = function(){
files <- list.files(path = (system.file("extdata", package = "vsop")) ,
pattern = ".xlsx", full.names = T) %>%
.[which(!stringr::str_detect(., "~"))] %>%
.[which(stringr::str_detect(., "Kommunevis avvirkning"))]
df = readxl::read_xlsx(path = files[1], sheet = 1, skip = 2, col_names = T)[NULL, ]
for (i in seq_along(files)){
df = rbind(df, readxl::read_xlsx(path = files[i], sheet = 1, skip = 2, col_names = T))
}
return(df)
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/VSOP_fylke_mnd.R
\name{kommunevis}
\alias{kommunevis}
\title{Kommunevis vsop}
\usage{
kommunevis()
}
\arguments{
\item{Behøver}{ingen parametere. Datafilene ligger i egen folder.}
}
\value{
a tibble with logging statistics
}
\description{
Kommunevis vsop
}
\examples{
devtools::install_github("hbelbo/vsop")
kommunevis()
}
Markdown is supported
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