[R] unicode variable and function names?

David Winsemius dwinsemius at comcast.net
Tue Jan 4 02:25:57 CET 2011


On Jan 3, 2011, at 7:44 PM, stvienna wiener wrote:

> Dear List,
>
>
> Is it possible to have function names like ∀ (unicode universal  
> quantifier)?
> This question is inspired by agda source code, which supports this.
>
> http://www.cs.nott.ac.uk/~nad/listings/lib-0.4/Algebra.html
>
> It would be handy to use. My guess is, however, that it's not  
> supportet in R.

If you are willing continue to call it as `∀` rather than s just ∀,  
then it seems to "work as expected".

 > `∀` <- function(x) {x+1}
 >
 > `∀`( c(1,2,3) )
[1] 2 3 4

Efforts to use the un-backquoted variants were failures for me:

 > ∀ <- function(x) {x+1}
Error: unexpected input in "‚"

(Question: does your keyboard support such a character??? I.e,  Why  
would this be "handy"?)


-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list