Re: [ESS] Developing R packages under ESS

2018-03-08 Thread Boylan, Ross
I just wanted to evaluate some of the R code in the .Rnw file in my main R 
process, at global scope.  But ESS seemed to think C-c C-r meant to do 
something else (in that file), like sweaving, instead.  It may have tried just 
to do that on the highlighted region; I didn't investigate except to note it 
failed.

Ross


From: Sparapani, Rodney <rspar...@mcw.edu>
Sent: Thursday, March 8, 2018 11:21:57 AM
To: Boylan, Ross
Cc: ess-help
Subject: Re: [ESS] Developing R packages under ESS

Hi Ross:

Oh, you mean Sweaving and knitting?  That does work but it is a little
flaky at the moment.  There is a recent thread on ess-help about some
bugs in that code, however, no resolution as of yet.  Stay tuned!

--
Rodney Sparapani, PhD
Assistant Professor of Biostatistics
Medical College of Wisconsin, Milwaukee
-Original Message-
From: Ross Boylan <ross.boy...@ucsf.edu>
Date: Thursday, March 8, 2018 at 1:14 PM
To: Rodney Sparapani <rspar...@mcw.edu>
Cc: ess-help <ess-help@r-project.org>, "Boylan, Ross" <ross.boy...@ucsf.edu>
Subject: Re: [ESS] Developing R packages under ESS

Hmm, before I got the latest ESS updates, when I did code evaluation
commands in the .Rnw (vignette) file ESS evaluated the code in R.  Now, when
I did C-c C-r, it tried to build some tex files.  I think I was using
C-c C-n before, so I'm not sure if this is a change.  But it sounds as if
it might be related to the change you highlighted.

BTW, my intention was that the vignette code is evaluated at global scope.



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


[ESS] Developing R packages under ESS

2018-03-07 Thread Boylan, Ross
Can anyone suggest to me a good way to develop R packages with ESS?  "good" 
here means that I  can debug the code and make changes to the code without 
rebuilding the whole package.

So far I've tried a bunch of different approaches, but none has quite worked.

1. When I had an old (or even new) version of the package in the standard load 
paths I tended to get "namespace is locked" errors when I modified the code and 
attempted to read it in.  So I deleted the installation in the standard path.

2. Wrote a script that sourced all the .R files.  But when I change them and 
reload in ESS I get the error "unable to load ", even if I do C-c 
C-t C-s to turn off the namespace.  I suspected the problem might have been 
from evaluating vignette code in an .rnw file, but even if I copied and pasted 
it into the the main *R* buffer I still get the problem:
 Loading required package: LazarSim
 Error in .requirePackage(package) (from SimParameters.R#35) :  

  
   unable to find required package ‘LazarSim’
 In addition: Warning message:
 In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = 
TRUE,  :
   there is no package called ‘LazarSim’
BTW, that error happened after I attempted to execute some code from the 
package, not when I issued any load/library/require type command.

R is running in the directory above the package directory.
Grep confirms my recollection that I don't have code that does require().
Maybe R overrides the basic code for sourcing files?  My test file uses 
source() to load the source files, which are in the package directory.

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


Re: [ESS] make problems with latest git [SOLVEDish]

2018-03-06 Thread Boylan, Ross
Thank you, Lionel and Rodney.  That did the trick: the whole thing built, 
including the documents.

Will everything actually work properly without xref?  I assume xref was 
required because something uses it.

I even got a build in the original directory after doing a make clean.

There are still lots of warnings

And I assume it still won't build in a shell in emacs.

But now I can return to my original problem (not yet posted).

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


Re: [ESS] void-function ess-message [SOLVED?]

2017-09-25 Thread Boylan, Ross
I did a make clean and then make, and now everything seems to be working.

If anyone has a more precise understanding of the source of the previous error, 
I'd love to know.  My theory was that the old elc files were screwing things up.

There were also a bunch of warnings associated with the make; I can share them 
if anyone is interested.

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


[ESS] void-function ess-message

2017-09-25 Thread Boylan, Ross
I just updated ESS to the latest git version 
(62994e21c816e2bdd0e5b74f8cfdc00e6bb6c088), and now get the error about 
ess-message being undefined on startup.  Any ideas what the problem is?

The function ess-message seems to be defined in both ess-comp and ess-utils, so 
perhaps this is some kind of sequencing issue?  Or it should only be defined 
once?

Details:
Debian GNU/Linux 8.9.  Emacs 24.4.1.
My .emacs file has
--
let ((mydir "~ross/ESS/lisp"))
  (if (file-readable-p mydir)
(setq load-path (append load-path (list mydir)))
(load "ess-site")))

(load "ess-site")
--
The condition in the if is true.


ebugger entered--Lisp error: (void-function ess-message)
  ess-message("[ess-site:] ess-lisp-directory = '/home/ross/ESS/lisp'")
  byte-code("\301\302\303^H!\"\210\304\305!\210\306\307\310^H\"!\207" 
[ess-lisp-directory add-to-list load-path file-name-as-directory r$
  load("ess-site")
  eval-buffer(# nil "/home/ross/.emacs" nil t)  ; Reading at 
buffer position 316
  load-with-code-conversion("/home/ross/.emacs" "/home/ross/.emacs" t t)
  load("~/.emacs" t t)
  #[0 "^H\205\262^@ \306=\203^Q^@\307^H\310Q\202;^@ 
\311=\204^^^@\307^H\312Q\202;^@\313\307\314\315#\203*^@\316\202;^@\313\307\314\3$
  command-line()
  normal-top-level()

Buffer position 316 is just after the second (load "ess-site").

So I am using the directory from git directly.  I don't always run make, but I 
did this time, and there were complaints at ess-compat:

[ess-site:] require 'ess-julia
Source file `/home/ross/ESS/lisp/ess-julia.el' newer than byte-compiled file
[ess-site:] require 'ess-sp3-d
Source file `/home/ross/ESS/lisp/ess-sp3-d.el' newer than byte-compiled file
[ess-s-l:] (def** ) only ...
Symbol's value as variable is void: ess-etc-directory
Makefile:115: recipe for target 'ess-compat.elc' failed
make[1]: *** [ess-compat.elc] Error 255
make[1]: Leaving directory '/home/ross/ESS/lisp'
Makefile:10: recipe for target 'all' failed
make: *** [all] Error 2

Maybe it was cut off early and somehow that messed things up?  ess-utils.elc 
(among others) is much older than ess-utils.el.

Thanks.
Ross Boylan

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


[ESS] trouble with interactive SAS mode in ESS 13.09-1

2016-11-10 Thread Boylan, Ross
I don't seem able to get my code to execute in SAS.  Specifically, only the 
first line in the region seems to be transmitted.  Could the fact it is in a 
file that does not have a .sas extension be a factor?  Also, I have problems 
exiting.  BTW, http://ess.r-project.org/Manual/news.html doesn't show any 
SAS-related changes after 13-09-1.

Here's what happens:
start emacs 24.3.1 on linux/Ubuntu
open file  tng-sim_1.mprint in emacs.
M-x sas-mode
buffer mode line now shows ESS[SAS] [SAS]
M-x SAS
emacs now shows 4 panels, including *SAS.log* showing initialization of the SAS 
system (in other words, it found the executable).
I switch to the mprint buffer and highlight the region I want to execute and 
hit C-c C-r.
Emacs displays "starting evaluation ..." at the bottom, and just stays that 
way.  It is unresponsive to most keypresses, except to beep.  There are no 
visible changes in other buffers.
C-g interrupts things.  The log window now shows the first line only of the 
buffer.  If I've done this before it causes the prior single line to execute.

The behavior I'm expecting when I hit C-c C-r is for the entire region to 
execute (since it has run; at the end) and appropriate log and list output to  
appear.

Another oddity is that the log and list windows both look as if they have 
shells in them, though I presume that is by design.  That may be related to my 
exit problem:

In the mprint buffer I go
C-c C-q and confirm I want to exit.
endsas; appears in the log and *SAS* buffers; the latter also shows "Process 
SAS finished at ..."
However, when I switch to the log or lst buffer and try to kill it (C-x C-k) I 
get the message that it has a running process and asking if I want to kill it.  
This puzzled me since the SAS process is supposed to be dead.  Maybe a 
reference to the apparent shell process of the buffer?


*SAS.lst*---
sh-4.3$ tty
/dev/pts/4
sh-4.3$ 


---*SAS* after 3 
attempts
+ stdout=/dev/pts/4
+ stderr=/dev/pts/5
+ shift 2
+ set +x
sas /dev/pts/4 2>/dev/pts/5 -stdio -linesize 80 -noovp 
-nosyntaxcheck
data gen ids;   
  
data gen ids;   
  
data gen ids; 


---*SAS.log* (with some lines 
removed)-
sh-4.3$ tty
/dev/pts/5
sh-4.3$ 1The SAS System
   12:29 Thursday, November 10, 2016

NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA. 
NOTE: SAS (r) Proprietary Software 9.4 (TS1M3) 
NOTE: This session is executing on the Linux 4.4.0-47-generic (LIN X64) 
  platform.

NOTE: Additional host information:

 Linux LIN X64 4.4.0-47-generic #68~14.04.1-Ubuntu SMP Wed Oct 26 19:42:11 UTC
  2016 x86_64 Unrecognized Linux Distribution

NOTE: SAS initialization used:
  real time   1.28 seconds
  cpu time0.05 seconds

1
2data gen ids;
NOTE: The data set WORK.GEN has 1 observations and 0 variables.
NOTE: The data set WORK.IDS has 1 observations and 0 variables.
NOTE: DATA statement used (Total process time):
  real time   34.58 seconds
  cpu time0.02 seconds

3data gen ids;
NOTE: The data set WORK.GEN has 1 observations and 0 variables.
NOTE: The data set WORK.IDS has 1 observations and 0 variables.
NOTE: DATA statement used (Total process time):
  real time   14:47.20
  cpu time0.03 seconds
^L2The SAS System
   12:29 Thursday, November 10, 2016


4data gen ids;

-- region I'm trying to 
execute--
data gen ids;   
  
call streaminit(123);   
  
srho = sqrt(abs(0.5));  
  
smrho = sqrt(1-abs(0.5));   
  
drop srho smrho;
  
do iSim = 1 to 1;