[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ess-help
Subject:    Re: [ESS] underscore in BUGS mode
From:       "Richard M. Heiberger" <rmh () temple ! edu>
Date:       2012-03-24 20:52:00
Message-ID: CAGx1TMB-yLRMBM2FhnbNoGmE5b86nSEdNWKjff7z9G7rn046CQ () mail ! gmail ! com
[Download RAW message or body]

_ is still the assignment operator in S-Plus 8.2 and gives the following
warning:
> a_12
    Use of underscore, '_', for assignment is deprecated and will be
removed in a future release.
 Please use '<-' or '=' instead.
> a
[1] 12
>
quoting the variable name works in S-Plus and in R
> `a_12` <- 15
> `a_12`
[1] 15
>
This quotation in a function argument name works in S-Plus and in R
> test <- function(`a_b`=NULL) `a_b`
> test()
NULL
> test(13)
[1] 13
>
> test(`a_b`=14)
[1] 14
>

On Sat, Mar 24, 2012 at 4:38 PM, Jack Tanner <ihok@hotmail.com> wrote:

> Rodney Sparapani <rsparapa <at> mcw.edu> writes:
>
> >
> > Jack Tanner wrote:
> > >
> > > 1. In ESS[BUGS] mode, underscore is bound to ess-bugs-hot-arrow, which
> is
> > > definitely wrong, because it doesn't let me create variables like
> foo_bar.
> >
> > That's true.  I'm assuming that you are using BUGS/JAGS with R/S-plus.
> > Since I have never seen underscore used in R/S-plus, I'm assuming the
> > same for BUGS/JAGS.  Of course, as the wags say, patches welcome.
>
> Well, underscore is a legal character in R identifiers. It hasn't been an
> operator in years. To treat is otherwise clashes with R's syntax rules.
> (Not
> sure about S-plus.) And it's never been an operator in BUGS, so ESS is just
> doing the wrong thing.
>
> I get the patches welcome part, but I'm definitely not a elisp hacker.
>
> ______________________________________________
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

	[[alternative HTML version deleted]]

______________________________________________
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic