knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of {lhmetools}
is to bundle all generic functions frequently used in LHMET.
To extract files from a rar
archive we have created the function unrar()
. This function allows extract files using unrar
[^1] tool from the command line. unrar
tool can be installed using your Linux distributions' package manager.
$ sudo apt update && sudo apt install --assume-yes unrar # Ubuntu and Debian
Windows users should install the 7-zip, a free software that can be easily installed from R using installr::install.7zip()
.
install.packages("installr") # only for windows install.7zip()
[^1]: It's developed by RARLAB and made available in Linux and other Unix based operating systems.
You can install {lhmetools}
from GitHub with:
# install.packages("devtools") devtools::install_github("lhmet/lhmetools")
unrar()
: extract files from a rar
archive.
complete_dates()
: complete missing data combinations leaving explicit
missing dates.
dates_from_files()
: parse dates from file names.
This is a basic example which shows you how to extract files:
library(lhmetools) ## basic example code rarfile_url <- "https://ndownloader.figshare.com/files/13366451" dest_file <- tempfile(fileext = ".rar") download.file(rarfile_url, dest_file, mode = 'wb') (extracted_files <- unrar(dest_file))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.