NameEncode
Obsolete functions to mimic Spotfire's former method of encoding names of columns that are sent to a data function.

Description

These functions do what the functions by the same name in the Spotfire expression languge do: they convert between general UTF-8 strings and encoded versions that use only 7-bit ASCII characters that are syntactically valid R object names.

Usage

NameEncode(str, force = FALSE)
NameDecode(str, force = FALSE)

Arguments

str a vector of strings.
force a logical value.
  • If FALSE (the default), then return the input unaltered.
  • If TRUE, then return the encoded or decoded strings.
Value
Note
These functions should not be used in data functions written for Spotfire 5.0 or later. These functions exist only so data functions written for Spotfire continue to work.
When Spotfire 4.5 sent a data table to a data function, it converted the names of the columns to names that are syntactically valid R language names. On return to Spotfire, the names of columns were converted back to their original form. You might have needed to use these functions if your data function also passed character strings that refer to the column names. Spotfire 5.0 and later versions do not do this encoding automatically; however, the Spotfire expression language functions NameEncode and NameDecode do it if you call them.
Examples
e <- NameEncode(c("Revenue ($/month)", "Associate"))
e
e <- NameEncode(c("Revenue ($/month)", "Associate"), force=TRUE)
e
NameDecode(e, force = TRUE)
Package SpotfireUtils version 6.0.0-69
Package Index