View HTML rendering of matched DOIs htmlwidget to show how DOIs are matched in strings.

view_doi_matches(string)

view_doi_matches_perline(string)

view_doi_matchesOutput(outputId, width = "100%", height = "100%")

renderView_doi_matches(expr, env = parent.frame(), quoted = FALSE)

Arguments

string

Input vector. Either a character vector, or something coercible to one.

outputId

output variable to read from

width

Must be a valid CSS unit (like "100%", "400px", "auto") or a number, which will be coerced to a string and have "px" appended.

height

Must be a valid CSS unit (like "100%", "400px", "auto") or a number, which will be coerced to a string and have "px" appended.

expr

An expression that generates an HTML widget (or a promise of an HTML widget).

env

The environment in which to evaluate expr.

quoted

Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable.

Details

Highlighting DOIs matching the regular expression can help users troubleshoot their input, for example inside shiny apps.

Functions

  • view_doi_matches_perline: Accepts only a scalar string, but retains linebreaks. Helpful for showing matches from input widgets.

  • view_doi_matchesOutput: Shiny output widget to show matched DOIs

  • renderView_doi_matches: Shiny render function to show matched DOIs

See also

Examples

view_doi_matches("lorem ipsum 10.1000/foo dolor ist 10.1000/bar")