Utility functions to handle frequent string operations.

is_URL(x)

make_SPARQL_variable_names(x)

create_URI(x)

Arguments

x

A character vector.

Details

The functions take character vector and are used to accomplish simple string operations, such as replacement of undesired characters or other simple transformations. The functions are not exported as it's unlikely that anyone would found them useful outside the package environment.

is_URL

Check which elements of character vector are formatted as URLs; the checks are simplistic for internal use and generally not useful outside the package context.

make_SPARQL_variable_names

Wrapper for the gsub function that replaces special characters with underscore. Collections of special characters are replaced with one underscore character.

Wrapper for the gsub function that replaces special characters with underscore. Collections of special characters are replaced with one underscore character. By default, selected strings will be suffixed with /rdfs:label. This behaviour can be controlled via SmarterScotland.suffix_rdf option.