# HG changeset patch
# User JeanPierre Flori <jeanpierre.flori@ssi.gouv.fr>
# Date 1384437958 3600
# Node ID 34061213fb3bb2d63edbdec8df6a252a8b37c03e
# Parent f0ee3538887fe739601babb54e177ec5e1133b7a
Upgrade R to version 3.0.2.
diff git a/sage/interfaces/r.py b/sage/interfaces/r.py
a

b


519  519  EXAMPLES:: 
520  520  
521  521  sage: print r._source("print.anova") 
522   function (x, digits = max(getOption("digits")  2, 3), signif.stars = getOption("show.signif.stars"), 
 522  function (x, digits = max(getOption("digits")  2L, 3L), signif.stars = getOption("show.signif.stars"), 
523  523  ... 
524  524  """ 
525  525  if s[2:] == "()": 
… 
… 

539  539  EXAMPLES:: 
540  540  
541  541  sage: print r.source("print.anova") 
542   function (x, digits = max(getOption("digits")  2, 3), signif.stars = getOption("show.signif.stars"), 
 542  function (x, digits = max(getOption("digits")  2L, 3L), signif.stars = getOption("show.signif.stars"), 
543  543  ... 
544  544  """ 
545  545  return self._source(s) 
… 
… 

552  552  
553  553  EXAMPLES:: 
554  554  
555   sage: r.version() 
556   ((2, 15, 2), 'R version 2.15.2 (20121026)') 
 555  sage: r.version() # not tested 
 556  ((3, 0, 1), 'R version 3.0.1 (20130516)') 
 557  sage: rint, rstr = r.version() 
 558  sage: rint[0] >= 3 
 559  True 
 560  sage: rstr.startswith('R version') 
 561  True 
557  562  """ 
558  563  major_re = re.compile('^major\s*(\d.*?)$', re.M) 
559  564  minor_re = re.compile('^minor\s*(\d.*?)$', re.M) 
… 
… 

2046  2051  
2047  2052  EXAMPLES:: 
2048  2053  
2049   sage: r_version() 
2050   ((2, 15, 2), 'R version 2.15.2 (20121026)') 
 2054  sage: r_version() # not tested 
 2055  ((3, 0, 1), 'R version 3.0.1 (20130516)') 
 2056  sage: rint, rstr = r_version() 
 2057  sage: rint[0] >= 3 
 2058  True 
 2059  sage: rstr.startswith('R version') 
 2060  True 
2051  2061  """ 
2052  2062  return r.version() 
2053  2063  