Displaying 1 result from an estimated 1 matches for "gstr".
Did you mean:
gst
2005 May 07
4
string syntactic sugar in R? - long post
...words - because of
forgotten spaces. Not to mention mixing up or
unbalancing quote marks etc. The approach used by
paste is similar to that of many other languages (like
early Java, VB etc) and is inherently error-prone
because of poor visualization. There is a way to
improve it.
In the Java world gstrings were introduced
specifically for this purpose. A gstring is a string
with variable names embedded and replaced by values
(converted to strings, lazy eval) before use. An
example in R-syntax would be:
>alpha <- 8; beta="xyz"
>gstr <- "the result is ${alpha} with the c...