knitr::opts_chunk$set(echo = TRUE, collapse = TRUE, comment = "#>")
library(fml)

fml

Build status CRAN status Coverage Status

Downloads Downloads lifecycle

File Management and Location tools

Installation

Install the development version from Github with:

## install remotes pkg if not already
if (!requireNamespace("remotes", quietly = TRUE)) {
  install.packages("remotes")
}

## install from github
remotes::install_github("mkearney/fml")

Find or search for files

## find the rtweet readme
find_file("rtweet", "README.Rmd")
## starts with capital letter and doesn't end with md/html
search_file("[A-Z]*[!md|html]")

## all .yml files not in docs/
search_file("[!docs]*.yml")

## .yml files that start with a dot
search_file(".*.yml")

Files in projects

## locate file in project
here("R", "fp.R")

List files/directories

## list files in directory
list_files(full = FALSE)
## list dirs in directory
list_dirs(full = FALSE)
## list files AND paths in directory
list_paths(full = FALSE)

Misc

## build this/that
fp("this", "that")

## pipe style
"this" %FP% "that"
## build this/that
pe(fp(".", "this", "that"))

## pipe style
pe("~" %FP% "this" %FP% "that")


mkearney/fml documentation built on May 9, 2019, 10:43 a.m.