Re: [ESS] TWITTER API environment variables

2020-04-09 Thread Patrick Connolly via ESS-help
G'day Ista,

Thanks for setting me straight on that.  I was misled by the fact that
my username on this machine is pat.  Something led me to believe that
the twitter environment would be TWITTER_WORK but I don't have remote
access to check (and be disabused of that notion).

In any case, the problem seems to have vanished.  I'm a bit
uncomfortable not understanding why the problem arose and disappeared
with no error message.  I've wasted hours on this issue.

Best

Patrick


On Thu, 09-Apr-2020 at 10:32AM -0400, Ista Zahn wrote:

|> Hi Patrick,
|> 
|> Are you sure you've diagnosed the issue correctly? From what I can see
|> the name of the environment variable is always TWITTER_PAT, at least
|> in the current rtweet release (0.7.0). get_tokens calls twitter_pat
|> (https://github.com/ropensci/rtweet/blob/v0.7.0/R/tokens.R#L120) and
|> twitter_pat hard-codes TWITTER_PAT
|> (https://github.com/ropensci/rtweet/blob/v0.7.0/R/tokens.R#L371). In
|> short I don't see anything suggesting that the name of the environment
|> variable includes a user name at all.
|> 
|> Best,
|> Ista
|> 
|> On Wed, Apr 8, 2020 at 7:22 PM Patrick Connolly via ESS-help
|>  wrote:
|> >
|> >
|> > I'm using the rtweet package which makes use of the Twitter API which
|> > requires a token alluded to by an environment variable.
|> >
|> > That environment variable is automatically set up from the Twitter web
|> > site and takes the name TWITTER_ (where  is the
|> > name of the user in block letters).  That worked fine on my work
|> > computer where my username is 'work'.  When I copied that working
|> > directory to my home computer, the environment variable became
|> > TWITTER_HOME but the rtweet package was looking for
|> > TWITTER_WORK. There was no error message: just a null result from the
|> > search_users() function.
|> >
|> > I tried editing the ~/.Renviron entry to
|> > TWITTER_WORK=/home/home/.rtweet_token.rds
|> >
|> > That worked for a short time but soon ceased working.  Then I noticed
|> > a new entry had been automatically added to ~/.Renviron
|> >
|> > TWITTER_HOME=/home/home/.rtweet_token1.rds
|> >
|> > So now I had two environment variables which also worked for a short
|> > time.
|> >
|> > No such problem arises if R is run from the bash prompt or Rstudio,
|> > but editing functions is so clunky that way.  I've used ESS for more
|> > than 20 years and find it preferable.
|> >
|> > R-3.6.3, ESS 17.11
|> >
|> > Any ideas what could be causing the token connexion being lost
|> > appreciated.
|> >
|> > --
|> > ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
|> >___Patrick Connolly
|> >  {~._.~}   Great minds discuss ideas
|> >  _( Y )_ Average minds discuss events
|> > (:_~*~_:)  Small minds discuss people
|> >  (_)-(_)  . Eleanor Roosevelt
|> >
|> > ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
|> >
|> > __
|> > ESS-help@r-project.org mailing list
|> > https://stat.ethz.ch/mailman/listinfo/ess-help

-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.   
   ___Patrick Connolly   
 {~._.~}   Great minds discuss ideas
 _( Y )_ Average minds discuss events 
(:_~*~_:)  Small minds discuss people  
 (_)-(_)  . Eleanor Roosevelt
  
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


[ESS] TWITTER API environment variables

2020-04-08 Thread Patrick Connolly via ESS-help


I'm using the rtweet package which makes use of the Twitter API which
requires a token alluded to by an environment variable.

That environment variable is automatically set up from the Twitter web
site and takes the name TWITTER_ (where  is the
name of the user in block letters).  That worked fine on my work
computer where my username is 'work'.  When I copied that working
directory to my home computer, the environment variable became
TWITTER_HOME but the rtweet package was looking for
TWITTER_WORK. There was no error message: just a null result from the
search_users() function.

I tried editing the ~/.Renviron entry to
TWITTER_WORK=/home/home/.rtweet_token.rds

That worked for a short time but soon ceased working.  Then I noticed
a new entry had been automatically added to ~/.Renviron

TWITTER_HOME=/home/home/.rtweet_token1.rds

So now I had two environment variables which also worked for a short
time.

No such problem arises if R is run from the bash prompt or Rstudio,
but editing functions is so clunky that way.  I've used ESS for more
than 20 years and find it preferable.

R-3.6.3, ESS 17.11

Any ideas what could be causing the token connexion being lost
appreciated.

-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.   
   ___Patrick Connolly   
 {~._.~}   Great minds discuss ideas
 _( Y )_ Average minds discuss events 
(:_~*~_:)  Small minds discuss people  
 (_)-(_)  . Eleanor Roosevelt
  
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [ESS] How to type an underscore "_" in emacs with ESS in a SAS program

2019-04-14 Thread Patrick Connolly via ESS-help
On Thu, 11-Apr-2019 at 11:58AM -0600, Karen Taves via ESS-help wrote:

|> I am new to using ESS and am using ESS 18.10.2 and trying to type
|> an underscore "_" in emacs in a SAS program and am getting the
|> following error message: Symbol's function definition is void:
|> ess-smart-S-assign

I don't know about SAS, but in R, typing a second underscore bypasses
what normally happens, i.e. makes an assignment, i.e. " <- " (without
the quotes).

HTH

|> 
|> I suspect that I need to add something to my .emacs file. 
|> My .emacs file as the following 2 lines (and I don’t understand the format 
of this file so need specific instruction):
|> (add-to-list 'load-path "/home/scripts/ess-18.10.2/lisp")
|> (load "ess-autoloads”)
|> 
|> Thank you,
|> Karen
|> 
|> 
|> 
|> 
|>  [[alternative HTML version deleted]]
|> 
|> __
|> ESS-help@r-project.org mailing list
|> https://stat.ethz.ch/mailman/listinfo/ess-help

-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.   
   ___Patrick Connolly   
 {~._.~}   Great minds discuss ideas
 _( Y )_ Average minds discuss events 
(:_~*~_:)  Small minds discuss people  
 (_)-(_)  . Eleanor Roosevelt
  
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help