insert_anchor: Insert a hash anchor

Description Usage Arguments Details Examples

View source: R/anchoring.R

Description

Insert a hash anchor

Usage

1
2
insert_anchor(enclosing_start = "#< ", enclosing_end = " >#",
  range_input = .Machine$integer.max, ...)

Arguments

enclosing_start

A string that specifies the left-hand side enclosing of the hash

enclosing_end

A string that specifies the right-hand-side enclosing of the hash. If NULL, then the reverse of enclosing_start is used.

range_input

A number giving the range from which to draw a random number.

...

further arguments to be passed to and from other methods, in in particular to digest

Details

The function draws a random number using sample from the range of range_input. Then, this number is hashed by calling the digest hash-function from the digest package. This hash is then wrapped between enclosing_start and enclosing_end.

Examples

1
2
3
4
5
## Not run: 
  # RStudio needs to run for this
  insert_anchor(enclosing_start = "#!")
  
## End(Not run)

XiaoliangJiang/IndependentStudy2017YW documentation built on May 29, 2019, 10:54 a.m.