#7771: fix R restart in interface
-----------------------------------+----------------------------------------
   Reporter:  kcrisman             |       Owner:  was         
       Type:  defect               |      Status:  needs_review
   Priority:  minor                |   Milestone:  sage-4.4.2  
  Component:  interfaces           |    Keywords:              
     Author:  Karl-Dieter Crisman  |    Upstream:  N/A         
   Reviewer:  Minh Van Nguyen      |      Merged:              
Work_issues:                       |  
-----------------------------------+----------------------------------------
Changes (by mvngu):

  * reviewer:  => Minh Van Nguyen


Old description:

> This nearly always happens after installing an R package and then
> following the directions Sage gives:
> {{{
> sage: r.restart()
> Error: object 'sage0' not found
> }}}
> This seems to be unrelated to whether R has recommended packages
> installed or not, so I am making a new ticket for this.  Making it minor
> since just restarting Sage takes care of things as well.

New description:

 This nearly always happens after installing an R package and then
 following the directions Sage gives:
 {{{
 sage: r.restart()
 Error: object 'sage0' not found
 }}}
 This seems to be unrelated to whether R has recommended packages installed
 or not, so I am making a new ticket for this.  Making it minor since just
 restarting Sage takes care of things as well.

 Apply in this order:

  1.
 
[http://trac.sagemath.org/sage_trac/attachment/ticket/7771/trac_7771-r-restart.patch
 trac_7771-r-restart.patch]
  1.
 
[http://trac.sagemath.org/sage_trac/attachment/ticket/7771/trac_7771-reviewer.patch
 trac_7771-reviewer.patch]

--

Comment:

 With the patch
 
[http://trac.sagemath.org/sage_trac/attachment/ticket/7771/trac_7771-r-restart.patch
 trac_7771-r-restart.patch], I got the following failure when doctesting
 with "-t -long -optional":

 {{{
 Expected:
     R is free software and comes with ABSOLUTELY NO WARRANTY.
     You are welcome to redistribute it under certain conditions.
     Type 'license()' or 'licence()' for distribution details.
     ...
     The R package 'aaMI' may now be loaded via r.library('aaMI').
     If this should not work, type reset(), or restart Sage.
 Got:
     The R package 'aaMI' may now be loaded via r.library('aaMI').
     If this should not work, type reset(), or restart Sage.
 }}}

 It might be simpler to just test for the output:

 {{{
 The R package 'aaMI' may now be loaded via r.library('aaMI').
 If this should not work, type reset(), or restart Sage.
 }}}

 I have attached a reviewer patch that does only that. With both patches, I
 now get the following failure:

 {{{
 #!sh
 [mv...@sage sage-4.4.1]$ ./sage -t -long -optional devel/sage-
 main/sage/interfaces/r.py
 sage -t -long -optional "devel/sage-main/sage/interfaces/r.py"

 <output-trancated>

 File "/dev/shm/mvngu/sandbox/sage-4.4.1/devel/sage-
 main/sage/interfaces/r.py", line 1755:
     sage: latex(r(2))  #optional requires the Hmisc R package
 Expected:
     2
 Got:
     % latex.default(sage12, file = "")
     %
     \begin{table}[!tbp]
      \begin{center}
      \begin{tabular}{r}\hline\hline
     \multicolumn{1}{c}{}\tabularnewline
     \hline
     $2$\tabularnewline
     \hline
     \end{tabular}
     <BLANKLINE>
     \end{center}
     <BLANKLINE>
     \end{table}
     <BLANKLINE>
 **********************************************************************
 1 items had failures:
    1 of   3 in __main__.example_67
 ***Test Failed*** 1 failures.
 For whitespace errors, see the file
 /dev/shm/mvngu/dot_sage/tmp/.doctest_r.py
          [11.5 s]
 }}}

 But that is for another ticket. So only my patch needs reviewing by anyone
 but me.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7771#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to