simple_uri: Clean an URI so that it can be used as a filename

View source: R/get_data.R

simple_uriR Documentation

Clean an URI so that it can be used as a filename

Description

Replace "/" and ":" in an URI with "_" so that they can be used as filenames

Usage

simple_uri(uri, reverse=FALSE)

Arguments

uri

character, a URI

reverse

logical. If TRUE, the reverse operation is done

Value

character

Examples

uri <- "doi:10.7910/DVN/UNLRGC"
u <- simple_uri(uri)
u
simple_uri(u, reverse=TRUE)

reagro/carobiner documentation built on Dec. 4, 2024, 3:21 p.m.