insert_line: Insert new line(s) into existing metadata files.

Description Usage Arguments Value

View source: R/utils.R

Description

Insert new line(s) into existing metadata files.

Usage

1
2
3
4
5
6
7
8
insert_line(
  file,
  pattern,
  newlines,
  after = TRUE,
  path = "./inst/extdata/datasets",
  write_files = TRUE
)

Arguments

file

Filename, character

pattern

Pattern to search for, a regular expression

newlines

New line(s) to write, character vector

after

Insert new line(s) after pattern (T) or before (F)? Logical

path

Path to search; normally the metadata are in inst/extdata/datasets

write_files

Write resulting files back out? Logical

Value

Nothing; run for side effects


bpbond/cosore documentation built on July 20, 2021, 3:17 p.m.