[sage-support] Sage 7.0: changes in cartesian product, how to make Combinations work as its input?
Hello, in earlier versions of sage this worked: Omega = Combinations([1, 2, 3, 4, 5, 6], 4) A1 = Combinations([1], 1) A2 = Combinations([2, 3, 4, 5, 6], 3) A = CartesianProduct(A1, A2) A.cardinality() / Omega.cardinality() which we used in book for high school students to illustrate basic probability examples. Now this fails with assertion error (and no explanation attached). Digging deeper gives: File "/usr/local/sage/sage-7.0/local/lib/python2.7/site-packages/sage/combinat/cartesian_product.py", line 102, in CartesianProduct return cartesian_product(iters) File "/usr/local/sage/sage-7.0/local/lib/python2.7/site-packages/sage/categories/cartesian_product.py", line 174, in __call__ return super(CartesianProductFunctor, self).__call__(args, **kwds) File "/usr/local/sage/sage-7.0/local/lib/python2.7/site-packages/sage/categories/covariant_functorial_construction.py", line 221, in __call__ assert(all( hasattr(arg, self._functor_name) for arg in args)) AssertionError Simply making A1 and A2 list fails as well, because Combinations iterates over lists, so list(A1) is list of lists. TypeError: unhashable type: 'list' Easiest way I found around this is: A = cartesian_product([[tuple(a1) for a1 in A1], [tuple(a2) for a2 in A2]]) there is a LOT of syntax noise compared to simply: A = CartesianProduct(A1, A2) And the meaning is slightly different (in A there are tuples, in Omega there are lists, so we are not comparing same objects). Is there any simpler way to product output of Combinations? Limiting syntax noise is very important for making mathematical packages approachable to young students, and this change is definiately not along the lines. Also, it is important that most use cases are with same syntax, so if we have A1 = [1,2,3] A2 = [4,5,6] A = cartesian_product([A1, A2]) it would be good if the syntax was same for Combinations and other objects. Is the current behaviour designed or bug? Regards, Andrzej. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Plot saving segfault on 6.8, works on 6.7 (same machine, same config)
Thanks for quick fix. I can confirm the issue is gone now. Wanted to set positive review but came too late. Cheers, Andrzej. On Wed, Jul 29, 2015 at 10:12 AM, Volker Braun wrote: > This is a freetype bug. Fixed in http://trac.sagemath.org/ticket/18962 > > > On Tuesday, July 28, 2015 at 10:02:54 PM UTC+2, Andrzej Giniewicz wrote: >> >> Hello again, >> >> I have fresh build of sage 6.8 that (after setting locale) passed all >> tests. Unfortunately when I tried to build my book which works with >> sage 6.7 built on same machine with same options - I'm getting >> segfault. >> >> It occurs when I try to save the plot into svg for the second time >> after using matplotlib.rc('text', usetex=True) - if I don't make >> matplotlib use TeX, saving to svg works. If I write png after setting >> use TeX, it also works. Using savefig from matplotlib also fails, also >> when using ./sage -ipython. >> >> Full output in http://pastebin.com/ZfEj7WgY including gdb. >> Log from installing matplotlib: http://pastebin.com/qFY8y8wN >> >> Machine is Arch Linux (last updated 2 years ago), gcc 4.8.0. >> >> Failing code: >> >> sage: import matplotlib >> sage: matplotlib.rc('text', usetex=True) >> sage: plot(sin).save('test.svg') # works >> sage: plot(sin).save('test.svg') # segfault >> >> Tried with and without custom CFLAGS optimizations - same effect. >> >> Any idea what it might be? Smells like freetype, but on sage 6.7 >> everything works. >> >> Thanks in advance, >> Andrzej. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Plot saving segfault on 6.8, works on 6.7 (same machine, same config)
Hello again, I have fresh build of sage 6.8 that (after setting locale) passed all tests. Unfortunately when I tried to build my book which works with sage 6.7 built on same machine with same options - I'm getting segfault. It occurs when I try to save the plot into svg for the second time after using matplotlib.rc('text', usetex=True) - if I don't make matplotlib use TeX, saving to svg works. If I write png after setting use TeX, it also works. Using savefig from matplotlib also fails, also when using ./sage -ipython. Full output in http://pastebin.com/ZfEj7WgY including gdb. Log from installing matplotlib: http://pastebin.com/qFY8y8wN Machine is Arch Linux (last updated 2 years ago), gcc 4.8.0. Failing code: sage: import matplotlib sage: matplotlib.rc('text', usetex=True) sage: plot(sin).save('test.svg') # works sage: plot(sin).save('test.svg') # segfault Tried with and without custom CFLAGS optimizations - same effect. Any idea what it might be? Smells like freetype, but on sage 6.7 everything works. Thanks in advance, Andrzej. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: sage-6.8 - two failed tests for R interface
Just a follow up, when built with locale set, all tests passed - including one with multiply returned completions. Regards, Andrzej. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: sage-6.8 - two failed tests for R interface
This is built from scratch on Arch Linux (not updated since 2013). GCC is 4.8. This is compile script I use on this machine (earlier 6.7 worked with same build script): http://pastebin.com/gnh4Qivm I had other issue with build before but it was easily fixed. It stopped when building patch with: Found local metadata for patch-2.7.1 /usr/bin/env: python: No such file or directory Found local metadata for patch-2.7.1 /usr/bin/env: python: No such file or directory It was fixed by creating symlink from /usr/bin/python2 to /usr/local/bin/python (as this machine does not have python 3 installed, which is default on Arch). Anyway this shouldn't be realted to R tests. I checked those cases that failed in compiled version trough console, and this is result: http://pastebin.com/LtDKUF37 - on running system, completions worked. About library, I found out that this is due to locale (which is pl_PL.UTF-8 on this machine): sage: r.eval('require(foobar)') "\xc5\x81adowanie wymaganego pakietu: foobar\nKomunikat ostrzegawczy:\nW poleceniu 'library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, ':\n nie ma pakietu o nazwie \xe2\x80\x98foobar\xe2\x80\x99" As you see, in this locale there is no space before library( which is checked in r.library function. Probably the "if ' library(' in ret:" should be changed to regular expression matching non-word character (instead of space) and then 'library(' - or something similar. For now, I set locale to en_US.UTF-8 in build script. Any ideas why completions might work in installed system and not during test? Any logs that might help? Would be happy to send. Right now I'm doing fresh rebuild with locale set. Regards, Andrzej. On Tue, Jul 28, 2015 at 1:14 AM, Volker Braun wrote: > Haven't seen that one before. Did you build from scratch? Which OS? > > > > On Monday, July 27, 2015 at 10:07:42 PM UTC+2, Andrzej Giniewicz wrote: >> >> Hello, >> >> today I compiled sage-6.8 on my machine. Got two failures in R >> interface - very strange ones I must say - >> http://pastebin.com/Lvt6Lqt6 - all other tests pass. >> >> Anyone seen such error? In completions each method is listed twice and >> importing foobar does not raise exception. >> >> Regards, >> Andrzej. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] sage-6.8 - two failed tests for R interface
Hello, today I compiled sage-6.8 on my machine. Got two failures in R interface - very strange ones I must say - http://pastebin.com/Lvt6Lqt6 - all other tests pass. Anyone seen such error? In completions each method is listed twice and importing foobar does not raise exception. Regards, Andrzej. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] sagetex difficulty
Had similar issue some time ago on my document build server. Most likely another sagetex.sty installed with texlive/package management? It's easy to check which file is used in TeX by doing kpsewhich sagetex.sty Another possibility is that you have to run "texhash" to make TeX update files it knows, if $TEXMFHOME takes higher priority than system wide install (it should I believe) then updating file database might be enough. On Mon, Jun 11, 2012 at 6:37 PM, John Cremona wrote: > I am following the instructions at > http://www.sagemath.org/doc/installation/sagetex.html on a 64-bit > ubuntu machine running sage-5.0, installed in SAGE_ROOT=$HOME/sage-5.0 > . > > 1. I copied cp -R $SAGE_ROOT/local/share/texmf/tex $TEXMFHOME where > $TEXMFHOME is $HOME/texmf (default, not changed). > > This created a directory $HOME/texmf/tex/generic/sagetex/ in which are > carious files including sagetex.sty . > > 2. I created a file example.tex in $HOME (copying the file contents > from http://www.sagemath.org/doc/tutorial/sagetex.html). > > 3. I ran latex on that file twice. A file example.sage was created. > > 4. I ran Sage on that file; to make sure I picked up the right Sage > version from the many on this this machine I did directly > > $HOME/sage-5.0/sage example.sage > > Result-- output as follows: > > Traceback (most recent call last): > File "example.py", line 5, in > _st_ = sagetex.SageTeXProcessor('example') > File "/home/jec/sage-5.0/local/lib/python2.7/site-packages/sagetex.py", > line 68, in __init__ > raise VersionError, errstr > sagetex.VersionError: versions of .sty and .py files do not match. > example.sagetex.sage was generated by sagetex.sty version "None", but > is being processed by sagetex.py version "2012/01/16 v2.3.3-69dcb0eb93de". > Please make sure that TeX is using the sagetex.sty > from your current version of Sage; see > http://www.sagemath.org/doc/installation/sagetex.html. > > [Note that the file mentioend in that message, "example.sagetex.sage", > does not exist.] > > What did I do wrong? By the way, if I cd into > $HOME/texmf/tex/generic/sagetex/ and there run latex on the > example.tex file there, it creates a file example.sagetex.sage on > which sage runs fine, and after rerunning latex (twice) I get a dvi > file which looks perfect. > > John > > -- > To post to this group, send email to sage-support@googlegroups.com > To unsubscribe from this group, send email to > sage-support+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-support > URL: http://www.sagemath.org -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
Re: [sage-support] Re: Anyone have experience of running Sage Notebook on Kindle 3 web browser?
On Wed, Apr 27, 2011 at 8:37 PM, Rado wrote: > I just tried it and it works quite nice. Only annoying part is that numbers > and parenthesis are not on the keyboard, so you have to navigate with arrows > to select them then typing. The actual webpage rending is fine. I did > plotting. Even graph editor works but there is no way to move the mouse in > smaller chunks that predefined jumps, so its unusable. > Ask me if you want to know about anything in particular. thanks for checking, that's quite good news. And how about sliders in interact? Is there way to manipulate them? Andrzej. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Anyone have experience of running Sage Notebook on Kindle 3 web browser?
Hi, I don't have the device anywhere to test and did haven't found any information on list, so I decided to ask if someone tested how the notebook interface looks like on Kindle 3 web browser? I've heard that web browser of Kindle 3 can handle lots of standard web pages (iirc it's based on webkit), it can even render MathJax web fonts (I think jmol might be not supported out of the box though) - I'm thinking myself about getting one of those devices if basic features (authentication, notebook management, editing, evaluation, plotting and maybe @interact) of notebook works in it - its cheap device that comes with free 3G international internet and Wifi if available for faster connection (even if it's experimental, free internet is available in some countries for almost a year now), it would make quite nice on-the-go device, when loaded with books and with access to Sage, don't you think? Cheers, Andrzej. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
Re: [sage-support] sse2 problem resolved
Yes, I also had similar problems with plotting on Arch Linux when used pre-built packages on my other machine which is two CPU Pentium III machine. In my case it is said to be related to http://trac.sagemath.org/sage_trac/ticket/9382 - because package maintainer built it in a way that should work (with SAGE_FAT_BINARY='yes'). For now, before #9382 (or #10226) reaches release and packages are rebuilt with it which might happen for 4.7, just build from source and it will always work (or maybe there are some sse2-less packages for Ubuntu in some ppa? Not sure, cause I never used *buntu. Building from source will solve your problem for sure) Andrzej. On Sun, Mar 6, 2011 at 9:19 AM, Rolf wrote: > I encountered a problem when starting sage. I received the error > message listed below and sage did not start. > As stated removal of the text file solved the problem provisionally. > Sage did start and elementary functions could be performed but not for > instance simple plotting. > Installing several versions of ubuntu did not solve the problem as the > problem comes with the processor. On my computer, I use > AMD Sempron 3000+ > > Wikipedia offers a list of processors that support SSE2 > http://en.wikipedia.org/wiki/SSE2 > > > > WARNING! This Sage install was built on a machine that supports > instructions that are not available on this computer. Sage will > likely fail with ILLEGAL INSTRUCTION errors! The following processor > flags were on the build machine but are not on this computer: > > sse2 > > Email http://groups.google.com/group/sage-support for help. > To remove this warning and make Sage start, just delete > /home/mato/sage/local/lib/sage-flags.txt > > -- > To post to this group, send email to sage-support@googlegroups.com > To unsubscribe from this group, send email to > sage-support+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-support > URL: http://www.sagemath.org > -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
Re: [sage-support] Re: Accessing R documentation trough notebook broken with 4.6.1?
I made ticket for this http://trac.sagemath.org/sage_trac/ticket/10860 also, attached patch that fixes it for me. Sorry if I made something not along the rules or did not found best solution, it is some time since I last made some patches for Sage or coding in Python at all, and I got a little rusty here and there. Andrzej. On Mon, Feb 28, 2011 at 5:50 PM, Dr. David Kirkby wrote: > On 02/28/11 04:08 PM, kcrisman wrote: >> >> >> On Feb 28, 3:21 am, Andrzej Giniewicz wrote: >>> >>> Hello, >>> >>> today I noticed that I cannot access R docs trough notebook, while it >>> still works like usual from command line. This is what is inside >>> notebook when viewed as text: >>> >>> sage: r.lm? >>> >>> Traceback (most recent call last): >>> File "", line 1, in >>> File "_sage_input_3.py", line 10, in >>> exec compile(u'print _support_.docstring("r.lm", globals(), >>> system="sage")' + '\n', '', 'single') >>> File "", line 1, in >>> >>> File "/opt/sage/devel/sagenb/sagenb/misc/support.py", line 263, in >>> docstring >>> return html_markup(s) >>> File "/opt/sage/devel/sagenb/sagenb/misc/support.py", line 288, in >>> html_markup >>> return '' + preamble +'' + s >>> +'' >>> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position >>> 116: ordinal not in range(128) >>> >>> >>> Currently I don't have alpha of newer version, so I wanted to ask if >>> this is still visible with 4.6.2 versions and/or known issue. I've >>> looked trough track and found few similar issues related to for >>> example unicode handling in %latex, but not this particular. >> >> I can confirm this in 4.6.2.rc0. >> > Same here, with 4.6.2.rc1 on OpenSolaris. > > Dave > > -- > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing in e-mail? > > Dave > > -- > To post to this group, send email to sage-support@googlegroups.com > To unsubscribe from this group, send email to > sage-support+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-support > URL: http://www.sagemath.org > -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Accessing R documentation trough notebook broken with 4.6.1?
Hello, today I noticed that I cannot access R docs trough notebook, while it still works like usual from command line. This is what is inside notebook when viewed as text: sage: r.lm? Traceback (most recent call last): File "", line 1, in File "_sage_input_3.py", line 10, in exec compile(u'print _support_.docstring("r.lm", globals(), system="sage")' + '\n', '', 'single') File "", line 1, in File "/opt/sage/devel/sagenb/sagenb/misc/support.py", line 263, in docstring return html_markup(s) File "/opt/sage/devel/sagenb/sagenb/misc/support.py", line 288, in html_markup return '' + preamble + '' + s + '' UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 116: ordinal not in range(128) Currently I don't have alpha of newer version, so I wanted to ask if this is still visible with 4.6.2 versions and/or known issue. I've looked trough track and found few similar issues related to for example unicode handling in %latex, but not this particular. Andrzej. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
Re: [sage-support] doubly noncentral F distribution
On Thu, Oct 28, 2010 at 4:26 PM, Neal Becker wrote: > Is there any code for cdf of double noncentral F distribution? I think that SciPy.Stats have what you need. Check http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.ncf.html#scipy.stats.ncf - just verify the parameter order in their continuous distributions list: http://www.scipy.org/SciPyPackages/Stats?action=AttachFile&do=get&target=continuous.pdf -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
Re: [sage-support] Re: Some R integration samples - is there better way to do it?
Hi, > Note the following in > > sage: r.set? > > Definition: r.set(self, var, value) > Docstring: > Set the variable var in R to what the string value evaluates to > in > R. > > INPUT: > var -- a string value -- a string > > EXAMPLES: > sage: r.set('a', '2 + 3') sage: r.get('a') '[1] 5' > > > There should be interactive help (using ?) for most methods. Anyway, > r([1,2,3]) probably doesn't evaluate to anything in R. I know - read docstring for r.set, but I tried to use it to follow Tims example anyway: sage: r.set('y', r([1,2,3])) sage: r('y') [1] 1 2 3 I understood from Tims sample that r.set("variable", r(value)) would set it. Anyway, the thing I want to do is function taking variable name and pythonic list or value and using it in R to set variable value. Exactly stuff that is done by below code. in R: letSage <- function(variable,value) { .GlobalEnv[[variable]]<-value } in Sage: def setR(var, val): r.letSage('"%s"'%var, r(val)) setR('y', [1,2,3]) setR('z', [1,'"ok"',3]) instead of mostly equivalent but with R syntax of vectors r.set('y', 'c(1,2,3)') r.set('z', 'c(1,"ok",3)') So the syntax r.set('var', r(val)) is meant to work? I think that way to set variable in R environment to normal list returned by other function would improve integration a lot, at least remove some intermediate steps. If we are at your sample I'm tottaly aware that '[1,2,3]' would not work, or r('[1,2,3]') - but it is r([1,2,3]) in question that evaluates to RElement "[1] 1 2 3" and is stored in one of temporary sage* variables, and as sample with setR shows, can be used to pass around python list, strings and stuff. cheers, Andrzej. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
Re: [sage-support] Some R integration samples - is there better way to do it?
ah, thanks - I know about r.tab, well - most of it are R commands, the issue is that I didn't found those sage specific ones - it would help if at least list of modified commands would appear in "r?" docstrings. Anyway, is r.set working? I used: sage: r.ls() character(0) sage: r.set('y', r([1,2,3])) sage: r.ls() [1] "sage0" "sage1" "sage2" "sage3" "sage4" and there is no variable 'y' in R env. (using sage 4.4.2 here, was it fixed/added/changed later on?) - anyway, variable 'y' is inserted when I used: %r letSage <- function(variable,value) { .GlobalEnv[[variable]]<-value } def setR(var, val): r.letSage('"%s"'%var, r(val)) and called it with: setR('y', [1,2,3]) so it still isn't what I look for, thout the "r(...)" for "val" helped to simplify it a lot. The r('var <- val') works, but requires to specify val as R code, so it's not best way I think. I'm looking for something you can pass list as argument, and preferably without r code and function above. The r.set if it worked would be nice I think :) cheers, Andrzej. On Sun, Jul 4, 2010 at 6:15 PM, Tim Joseph Dumol wrote: > On Mon, Jul 5, 2010 at 12:13 AM, Tim Joseph Dumol wrote: >> Hi Andrezj, >> >> On Sun, Jul 4, 2010 at 11:54 PM, Andrzej Giniewicz wrote: >>> Hi, >>> >>> recently I have given short introductory talk about Sage and questions >>> about integration with R arisen. Results of quickly put together code >>> is now at http://sagenb.org/home/pub/2232/ - especially, the question >>> was: "I have variable named x in R environment and want to get its >>> value, or variable named x inside Sage environment and push its value >>> into R, but keep the name." - what I was able to think about is quick >>> hack with .GlobalEnv of R, but is there better way to do what is >>> presented in the notebook linked above? Is there some syntax like >>> r["x"]=[1,2,3] or sth? If there is, I haven't noticed it yet - would >>> be thankful for hints. >>> >>> Cheers, >>> Andrzej. >>> >>> -- >>> To post to this group, send email to sage-support@googlegroups.com >>> To unsubscribe from this group, send email to >>> sage-support+unsubscr...@googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/group/sage-support >>> URL: http://www.sagemath.org >>> >> >> This should do what you wanted: >> >> sage: r('x <- c(1,2,3)') >> [1] 1 2 3 >> sage: r('x') >> [1] 1 2 3 >> sage: sageobj(r('x')) # r('x').sage() works too >> [1, 2, 3] >> sage: r([1, 2, 3]) >> [1] 1 2 3 > > Oh, and: > > sage: r.set('y', r([1,2,3])) > sage: r('y') > [1] 1 2 3 > > Try: > > sage: r. > > for more commands. >> --- >> Tim Joseph Dumol >> http://timdumol.com >> > > > > -- > Tim Joseph Dumol > http://timdumol.com > > -- > To post to this group, send email to sage-support@googlegroups.com > To unsubscribe from this group, send email to > sage-support+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-support > URL: http://www.sagemath.org > -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Some R integration samples - is there better way to do it?
Hi, recently I have given short introductory talk about Sage and questions about integration with R arisen. Results of quickly put together code is now at http://sagenb.org/home/pub/2232/ - especially, the question was: "I have variable named x in R environment and want to get its value, or variable named x inside Sage environment and push its value into R, but keep the name." - what I was able to think about is quick hack with .GlobalEnv of R, but is there better way to do what is presented in the notebook linked above? Is there some syntax like r["x"]=[1,2,3] or sth? If there is, I haven't noticed it yet - would be thankful for hints. Cheers, Andrzej. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Incomplete gamma: when returned by integrate it's named gamma_incomplete instead of gamma_inc, known issue?
I noticed this today, for some mysterious reason integrate returns non existing gamma_incomplete instead of gamma_inc, look at: [gi...@raven3 ~]$ sage -- | Sage Version 4.3.4, Release Date: 2010-03-19 | | Type notebook() for the GUI, and license() for information.| -- sage: var('a,b,t') (a, b, t) sage: assume(00,t>0) sage: integrate(x^(a-1)*exp(2*b*x), (x,0,t)) gamma(a)/((-1)^a*2^a*b^a) - gamma_incomplete(a, -2*b*t)/((-1)^a*2^a*b^a) sage: gamma_incomplete? Object `gamma_incomplete` not found. sage: gamma_inc? Type: function Base Class: String Form: Namespace: Interactive File: /opt/sage/sage/local/lib/python2.6/site-packages/sage/functions/transcendental.py Definition: gamma_inc(s, t) Docstring: Incomplete Gamma function Gamma(s,t). EXAMPLES: sage: gamma_inc(CDF(0,1), 3) 0.00320857499337 + 0.0124061858119*I sage: gamma_inc(3, 3) 0.846380162253687 sage: gamma_inc(RDF(1), 3) 0.0497870683678639 I'm writing from break between classes so don't have time to browse trac for this right now, is this known issue? regards, Andrzej. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org To unsubscribe from this group, send email to sage-support+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
Re: [sage-support] Sage 4.3.3 Fails To Build On 64 bit Linux System (gcc.4.4.2)
> Does the 64 bit build need some 32 bit libraries or is it > the case that the sage-4.3.3 doesn't yet build on a gcc.4.4.3 compiler? issue is probably somewhere else, I don't know about 4.3.3, but I just finished building sage 4.3.4 with gcc 4.4.3 on latest pure 64 bit Arch Linux (without lib32-* stuff) and it works like a charm :) -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org To unsubscribe from this group, send email to sage-support+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
Re: [sage-support] BoxPlot in Sage: how do we plot?
I don't know, lately R seems bit broken for me at least. I tried boxplotting but it cannot find Hmisc package. Installing package on other hand fails with R include directory is empty -- perhaps need to install R-devel.rpm or similar last time I remember it worked though, but it was long before R 2.10. Is there some new procedure to install packages, other than "sage -R" and doing install.packages or "sage" and r.install_packages? On Sun, Mar 14, 2010 at 8:22 AM, mo wrote: > I don't see a direct command in sage for BoxPlot. > Thus, I've tried many 'R' versions of boxplot (like: r.bxplot, > r.bplot, r.boxplot) on a dataset I have, but could not get a plot... > I am using the latest Sage Notebook (v 4.3.3) > Would you pls help? > > -- > To post to this group, send email to sage-support@googlegroups.com > To unsubscribe from this group, send email to > sage-support+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-support > URL: http://www.sagemath.org > -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
Re: [sage-support] Re: Xelatex and Sage notebook
> And what about LuaTeX? I think that it is better to keep "normal" > latex (which is usually pdflatex in dvi mode), pdflatex and add other > TeX's as option. I'd vote for LuaTeX instead of XeTeX, it's lot more compatible, iirc only 2 options from microtype package do not work with it and it's soft failure that really don't stop compilation (package is aware of luatex and can check for it). It too support utf8 formatted documents and OpenType fonts I think and is "next pdfTeX", so probably better of two. > btw: Why do we have %latex in Sage? Does anybody use it hevily in her/ > his notebooks? I personally use SageTeX if I need to work like that and almost no %latex. But I would use %latex if there was way to hide it without using %hide that's visible in cell, for example when it would work like TinyMCE edited text cells with double-click to edit or similar. Then it would be sweet to embed TeX in notebook, making it look nice especially in published worksheets. Andrzej. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
Re: [sage-support] Re: Setting up a sage server securely for students' use
> How about a new "Administering Sage" book added to the documentation? > Setting up a campus server, security concerns, etc., could be noted in it. any news on this topic? I'll need something similar soon so I wonder if I should use Byungchuls description and some digging or there is already some draft of such document in one place somewhere, first time I will use sage outside of my local machine or from server hosted elsewhere Andrzej. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] Re: DSage on Amazon EC2
Hi, > Do you intend to build a cluster this way or just want to test/develop > dsage ? right now just for tests, later for personal use in simulations to get more processing power reserve to speed up some simulation for cost of one beer and who know what more if it will be working - surely will be interested in dsage based algorithms and dsage itself :)... anyway I'm still at research stage, found cpuinfo of EC2 instances - http://www.cloudiquity.com/2009/01/amazon-ec2-instances-and-cpuinfo/ - that's output from inside virtual host that seem to be Xen based. One can upload totally custom OS image so it might be working, still reading message boards and pages though cheers, Andrzej. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] DSage on Amazon EC2
Hi, I just wonder - does anyone have experience on running DSage on Amazon EC2 (on preferably more than one instance) or similar Cloud-Computing service? I'm preparing to try out the platform but because of it's non- zero cost I'd prefer not go in blind, would be very happy if someone who did it already could share some or any informations about how it runs there, with what optimizations, etc regards, Andrzej. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Sage on ASUS Eee PC 901 Intel Atom
Hi, > I would build from source except I that ASUS does not make it simple > to install gcc and make and the like. Is it possible to build from > source from my desktop running 32bit Ubuntu so that it works on Atom > Xandros, and if so, how? well, I also have EEE 901 and it's not that hard after all to install build-essential tools, you can follow that simple how-to: http://wiki.eeeuser.com/howto:installingdevelopmenttools - there are also other tips: http://wiki.eeeuser.com/#sources_for_software not mentioning that http://wiki.eeeuser.com/ is really good source of information about your eee... also - in all this they say "add debian repository"... the problem is most repos today are updated and not binary compatible - I find http://mirrors.uol.com.br/pub/debian/pool/main/ really good, binary compatible repo with EeeOS 1.6 (I'm 99.999% sure that the version you have also, or something like 1.6.1 or so, depending when your machine went out from factory). Good luck :) cheers, Andrzej. ps.: watch out on temperature during build of sage, it takes quite some time on this little machine even in "super performance" mode, after all it's just 1.6GHz then... it have sensor you just have to modprobe it, look for temperature on wiki linked above and monitor it from time to time... iirc it's not good for it to go over 80 C-degrees and dangerous above 90 (was it 92 that Intel put in specification? maybe cpu will deal with it, but I would worry about plastic case :P), while I try to keep it under 70 in stress by taking it outside for some small while if you are lucky enough to have low temperature outside :) oh - and if you run out of space so you cannot install build-essential and don't want to remove unionfs, you can merge those two partitions and get space back and ability to restore to not factory default but to latests your own working version with all software installed, it includes a bit of playing with rescue mode and rsync, but is doable - but let's not spam this list with EEE related things, you can ask for details there: http://vip.asus.com/forum/view.aspx?id=20081217023828534&board_id=20&model=Eee%20PC%20901/Linux&SLanguage=en-us - where I asked about this and finally found solution after some time of looking around :) --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Sage-3.0 run-time errors in Arch linux
Hi, > So is Arch a direct descendent of Gentoo, i.e does it us a descendent > of its ebuild system? nope, Arch build system is more lightweight, it's PKGBUILD is like ebuild just in BASH not Python, it's also made for binrary distribution in mind with possible easy rebuild by user, while on Gentoo as far as I know you *have* to build almost everything... I think there are so much similarities because both systems created their managers with FreeBSD ports in mind... at least this is approximated explanation :) cheers, Andrzej. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Sage-3.0 run-time errors in Arch linux
Hi, > > interesting, I built sage successfully and don't have those errors - > > using Arch and no SAGE_ANYTHING environment variables... I noticed I > > have other release data - was you trying 3.0 (later release - there > > was second release, wasn't it?) - anyway - there's proof it works for > > The second release was minimal fixes to the notebook, so none of that > should make a difference compiling. We did try Sage 3.0 on Arch Linux > x86-64 and the Fortran compiler was a problem. What platform are you > on? Well, it's 32 bit, Athlon XP era... > What is the exact Arch Linux release [if there is such a thing]? hmm - Arch have rolling release system so there is almost no such thing like release except for few releases made each year to distribute installable media... anyway you can version Arch with dates/time, I upgrade regularly so it's not older than 24 hours usually... whole idea is very similar to gentoo's portage and ebuilds - but in binary i686 optimized form > One possibility is that the binary g95 we use is missing some system > dependencies to work properly on our test image. But I hadn't had time > to investigate yet. Arch Linux support in any form is quite new, so > the ride might be a little bumpy for a while. I't not that new - first version I've built on Arch was Sage 2.5 I think and was updating it without troubles with every release, till Arch moved to GCC4.3, then I had to wait a bit and had "break" from sage for some time... anyway - I'd say Arch support is quite old, just GCC4.3 support is new :) cheers, Andrzej. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Sage-3.0 run-time errors in Arch linux
Hi, > > I have installed sage-3.0 from pre-compiled binary version in Arch > > Linux. It works without any problem. > > However, if I compile it from source code using gcc-4.3, I am getting > > the following errors when I run the sage after finishing the > > compilation successfully: > > I doubt compilation finished successfully in your case. You need to > set SAGE_FORTAN to the system fortran since the g95 we ship is broken > on Arch. We didn't automate that so far and we have been discussing of > solving that problem by defaulting to gfortran if it is available. interesting, I built sage successfully and don't have those errors - using Arch and no SAGE_ANYTHING environment variables... I noticed I have other release data - was you trying 3.0 (later release - there was second release, wasn't it?) - anyway - there's proof it works for me: [EMAIL PROTECTED] ~]$ sage -- | SAGE Version 3.0, Release Date: 2008-04-22 | | Type notebook() for the GUI, and license() for information.| -- sage: 2+2 4 sage: cheers, Andrzej. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Can I still get binaries for version 2.10.4?
I can confirm that 2.10.4 builds with 512MB of RAM - but then I upgraded GCC to 4.3 so cannot say anything about 2.11 --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: sage 2.10 - still problems with getting R work [ticket 1476]
btw... in 1476 I also mentioned that sage-fortran (and it turns out that also g95) isn't able to build Hmisc package that is required by many others, is it possible to tell sage to use locally installed fortran compiler? (as in gfortran it works) --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] sage 2.10 - still problems with getting R work [ticket 1476]
Hi, http://sagetrac.org/sage_trac/ticket/1476 was closed some time ago as works-for-me, but both problems I was pointing out during 2.8.15 release are still here... I'm still getting http://giniu.ravenlord.ws/result.txt - first is small - in file $SAGE/local/lib/python2.5/site-packages/ rpy.py --> 323 Rver = self.__getitem__('R_version_string') should be --> 323 Rver = self.__getitem__('R.version.string') to fix second in files $SAGE/local/bin/R $SAGE/local/lib/r/bin/R I had to comment out #if test -n "${R_HOME}" && \ # test "${R_HOME}" != "${R_HOME_DIR}"; then # echo "WARNING: ignoring environment value of R_HOME" #fi the above would work if someone have ${R_HOME} set to R installation from Sage or doesn't have it at all, but as I use R as separate package I have it set to other place, this echo's warning and it gets in the way after above changes, I got: http://giniu.ravenlord.ws/result2.txt (I cut it when I saw it works) cheers, Andrzej. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Sage-2.9
Just finished building it... it took over 7hours on my machine, but it was worth it :)... btw - both 2 things about R are still actual in 2.9, that's "_" -> "." change for rpy to report version, and some comments to enable optional package installation... apart from that it is sweet :)... congratulations :) btw... it's known that plotting in R doesn't work well yet, right? using png() & dev.off() produces images with those numbers on it, and using straight plot/hist from R, opens up X11 window with plot (those numbers are also on it... I can make screenshot of it in X11 window if it can help) regards, Andrzej. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: SAGE-2.8.15!
tried to test it... but funny things, at first I wasn't able to install any package... take a look at this: gcc -std=gnu99 -I/opt/sage/local/lib/r//include -I/opt/sage/local/lib/ r//include -I/usr/local/include WARNING: ignoring environment value of R_HOME -fvisibility=hidden -fpic -I/opt/sage/local/include -L/opt/ sage/local/lib/ -c corStruct.c -o corStruct.o gcc: WARNING:: No such file or directory gcc: ignoring: No such file or directory gcc: environment: No such file or directory gcc: value: No such file or directory gcc: of: No such file or directory gcc: R_HOME: No such file or directory make: *** [corStruct.o] Error 1 this actually stops any addon R library installation... I got that running R from Sage, using !R and typing install.packages("MASS", dependencies=T) - there are more of those of course, for almost every .c file in libraries... after commenting out first few lines in local/bin/R and local/lib/r/bin/R - warning was no longer generated and thus I was able to install packages... (I think those can be commented because variables set and checked there are overwritten in "sagehack" just below... this almost allowed me to build packages, because one failed (it works on my plain R install, sage-fortran wasn't able to compile one file - it was library "Hmisc" that failed: sage_fortran -fpic -g -O2 -c largrec.f -o largrec.o In file largrec.f:27 DO xl=xlim(1),xlim(2)-width,xinc 1 Error: Loop variable at (1) must be a scalar INTEGER In file largrec.f:28 DO yl=ylim(1),ylim(2)-height,yinc 1 Error: Loop variable at (1) must be a scalar INTEGER In file largrec.f:29 DO xr=xl+width,xlim(2),xinc 1 Error: Loop variable at (1) must be a scalar INTEGER In file largrec.f:30 DO yu=yl+height,ylim(2),yinc 1 Error: Loop variable at (1) must be a scalar INTEGER make: *** [largrec.o] Error 1 is this sage_fortran problem or package problem but it works on system compiler... anyway I installed other package (tseries) and was able to use functions from (from R console, Sage console and notebook), just auto- compl. worked for those functions after they were called for the first time not before... On Dec 12, 2007 2:35 AM, Marshall Hampton <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm not very familiar with R and rpy, but in reading the rpy > documentation they implied that if you install optional R components > you do _not_ have to rebuild rpy...but I suppose someone should verify/ > test that. > > Marshall Hampton > cheers, Andrzej. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: SAGE-2.8.15!
On 10 Gru, 21:45, "William Stein" <[EMAIL PROTECTED]> wrote: > On Dec 10, 2007 12:26 PM, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote: > > > > > > > OK... > > > so I removed this file, and it is now never... well... seems that at > > switch from experimental to optional something went wrong on my local > > machine... now it says: > > > sage: import rpy > > sage: rpy.r > > > ... > > > /opt/sage/local/lib/python2.5/site-packages/rpy.py in __repr__(self) > > 321 > > 322 def __repr__(self): > > --> 323 Rver = self.__getitem__('R_version_string') > > 324 return "RPy version %s [%s]" % (rpy_version, Rver) > > 325 > > > /opt/sage/local/lib/python2.5/site-packages/rpy.py in > > __getitem__(self, name) > > 304 def __getitem__(self, name): > > 305 # use r's 'get' function here, because the rpy one > > only handles functions! > > --> 306 obj = self.__dict__[name] = self.__dict__.get(name, > > self.get(name)) > > 307 return obj > > 308 > > > : Error in function (x, pos = -1, envir = > > as.environment(pos), mode = "any", : > > variable "R_version_string" was not found > > > I remember I had same problem with experimental, I had to change > > underscore to dot in name, and it was also on RPy mailing list for few > > people... anyway I don't know if this is still some remaining part of > > old version, or new... I'm going to build clean sage and then get this > > package... will report back when it will be ready but it will take > > some time... > > > sorry for troubles, didn't thought it can be old-file-problem, > > I'm sorry for the troubles you're having, and greatly appreciate > that your testing the R spkg.] no problem, whole pleasure on my side :) > That rpy doesn't overwrite > old files, etc., is something I'll have to keep in mind when we make > new spkg's that include new versions of R and rpy -- we'll have > to be careful to delete the old rpy files manually. ok, so I build fresh sage 2.8.15, upgraded to get new singular, and then installed r-2.6.1.p6, this ensures fresh environment for R... unfortuneatlly I get: sage: import rpy sage: rpy.r --- Traceback (most recent call last) /home/giniu/ in () /opt/sage/local/lib/python2.5/site-packages/IPython/Prompts.py in __call__(self, arg) 521 522 # and now call a possibly user-defined print mechanism --> 523 manipulated_val = self.display(arg) 524 525 # user display hooks can change the variable to be stored in /opt/sage/local/lib/python2.5/site-packages/IPython/Prompts.py in _display(self, arg) 545 """ 546 --> 547 return self.shell.hooks.result_display(arg) 548 549 # Assign the default display method: /opt/sage/local/lib/python2.5/site-packages/IPython/hooks.py in __call__(self, * args, **kw) 132 #print "prio",prio,"cmd",cmd #dbg 133 try: --> 134 ret = cmd(*args, **kw) 135 return ret 136 except ipapi.TryNext, exc: /opt/sage/local/lib/python2.5/site-packages/IPython/hooks.py in result_display(s elf, arg) 160 161 if self.rc.pprint: --> 162 out = pformat(arg) 163 if '\n' in out: 164 # So that multi-line strings line up with the left column of /opt/sage/local/lib/python2.5/pprint.py in pformat(self, object) 109 def pformat(self, object): 110 sio = _StringIO() --> 111 self._format(object, sio, 0, 0, {}, 0) 112 return sio.getvalue() 113 /opt/sage/local/lib/python2.5/pprint.py in _format(self, object, stream, indent, allowance, context, level) 127 self._readable = False 128 return --> 129 rep = self._repr(object, context, level - 1) 130 typ = _type(object) 131 sepLines = _len(rep) > (self._width - 1 - indent - allowance) /opt/sage/local/lib/python2.5/pprint.py in _repr(self, object, context, level) 193 def _repr(self, object, context, level): 194 repr, readable, recursive = self.format(object, context.copy(), --> 195 self._depth, level) 196 if not readable: 197 self._readable = False /opt/sage/local/lib/python2.5/pprint.py in format(self, object, context, maxleve ls, level) 205 and whether the object represents
[sage-support] Re: SAGE-2.8.15!
OK... so I removed this file, and it is now never... well... seems that at switch from experimental to optional something went wrong on my local machine... now it says: sage: import rpy sage: rpy.r ... /opt/sage/local/lib/python2.5/site-packages/rpy.py in __repr__(self) 321 322 def __repr__(self): --> 323 Rver = self.__getitem__('R_version_string') 324 return "RPy version %s [%s]" % (rpy_version, Rver) 325 /opt/sage/local/lib/python2.5/site-packages/rpy.py in __getitem__(self, name) 304 def __getitem__(self, name): 305 # use r's 'get' function here, because the rpy one only handles functions! --> 306 obj = self.__dict__[name] = self.__dict__.get(name, self.get(name)) 307 return obj 308 : Error in function (x, pos = -1, envir = as.environment(pos), mode = "any", : variable "R_version_string" was not found I remember I had same problem with experimental, I had to change underscore to dot in name, and it was also on RPy mailing list for few people... anyway I don't know if this is still some remaining part of old version, or new... I'm going to build clean sage and then get this package... will report back when it will be ready but it will take some time... sorry for troubles, didn't thought it can be old-file-problem, A. On 10 Gru, 20:48, "William Stein" <[EMAIL PROTECTED]> wrote: > On Dec 10, 2007 11:33 AM, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote: > > > > > On 10 Gru, 19:57, "William Stein" <[EMAIL PROTECTED]> wrote: > > > On Dec 10, 2007 10:50 AM, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > I've seen that R moved from experimental to optional, now as > > > > r-2.6.1.p6, tryied it but got: > > > > > sage: import rpy > > > > --- > > > > Traceback (most recent call > > > > last) > > > > > /home/giniu/ in () > > > > > /opt/sage/local/lib/python2.5/site-packages/rpy.py in () > > > > 171 > > > > 172 # The new exception > > > > --> 173 RException = _rpy.RException > > > > 174 > > > > 175 # I/O setters > > > > > : 'module' object has no attribute > > > > 'RException' > > > > > that can be known issue but I decided I will report... :) > > > > Thanks. However: > > > (1) What operating system are you using exactly, and what gcc version? > > > to be most specific... > > Alright, I'm pretty stumped so far. what happens if you > just edit >/opt/sage/local/lib/python2.5/site-packages/rpy.py > and put a # at the beginning of the line >RException = _rpy.RException > and try again? I'm just curious. > > Something is really weird, since for all my installs the context for the code > you list above is: > > # Three new exceptions > # base exception > RPyException = _rpy.RPy_Exception; > > # R <-> Python conversion exception > RPyTypeConversionException = _rpy.RPy_TypeConversionException; > > # Exception raised by R > RPyRException = _rpy.RPy_RException > > # for backwards compatibility > RException = RPyException > > I wonder why your code looks totally different, why you have > # The new exception > RException = _rpy.RException > > That code doesn't even appear in my rpy.py. > > > > > > > [EMAIL PROTECTED] ~]$ gcc --v > > Using built-in specs. > > Target: i686-pc-linux-gnu > > Configured with: ../configure --prefix=/usr --enable-shared --enable- > > languages=c,c++,objc --enable-threads=posix --enable-__cxa_atexit -- > > disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable- > > clocale=gnu --disable-libstdcxx-pch --with-tune=generic > > Thread model: posix > > gcc version 4.2.2 > > > That's current Arch Linux, kernel 2.6.23.9 (stock distribution kernel) > > and gLibc 2.7, my machine is 32bit Athlon Barton, exactly it's: > > > [EMAIL PROTECTED] ~]$ cat /proc/cpuinfo > > processor : 0 > > vendor_id : AuthenticAMD > > cpu family : 6 > > model : 10 > > model name : AMD Athlon(tm) XP 2600+ > > stepping: 0 > > cpu MHz : 2091.122 > > cache size : 256 KB > > fdiv_bug: no > > hlt_bug : no > > f00f_bug: no > > coma_bug: no > > fpu : yes > > fpu_exception : yes > > cpuid le
[sage-support] Re: SAGE-2.8.15!
Well, now that's indeed strange... maybe old version that I had installed from -experimental messed something up, and it doesn't update this file so maybe it's old one?... this could explain why it looks different... revision of this file is quite old, that's Id tag: rpy.py 342 2007-02-20 16:41:47Z warnes... commenting this line out result in: sage: from rpy import * sage: r RPy version 1.0.1 [R version 2.6.1 (2007-11-26)] I will remove this file, make sure write permission on all files are ok and rebuild R spkg - I will be back with results in minutes... On 10 Gru, 20:48, "William Stein" <[EMAIL PROTECTED]> wrote: > On Dec 10, 2007 11:33 AM, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote: > > > > > On 10 Gru, 19:57, "William Stein" <[EMAIL PROTECTED]> wrote: > > > On Dec 10, 2007 10:50 AM, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > I've seen that R moved from experimental to optional, now as > > > > r-2.6.1.p6, tryied it but got: > > > > > sage: import rpy > > > > --- > > > > Traceback (most recent call > > > > last) > > > > > /home/giniu/ in () > > > > > /opt/sage/local/lib/python2.5/site-packages/rpy.py in () > > > > 171 > > > > 172 # The new exception > > > > --> 173 RException = _rpy.RException > > > > 174 > > > > 175 # I/O setters > > > > > : 'module' object has no attribute > > > > 'RException' > > > > > that can be known issue but I decided I will report... :) > > > > Thanks. However: > > > (1) What operating system are you using exactly, and what gcc version? > > > to be most specific... > > Alright, I'm pretty stumped so far. what happens if you > just edit >/opt/sage/local/lib/python2.5/site-packages/rpy.py > and put a # at the beginning of the line >RException = _rpy.RException > and try again? I'm just curious. > > Something is really weird, since for all my installs the context for the code > you list above is: > > # Three new exceptions > # base exception > RPyException = _rpy.RPy_Exception; > > # R <-> Python conversion exception > RPyTypeConversionException = _rpy.RPy_TypeConversionException; > > # Exception raised by R > RPyRException = _rpy.RPy_RException > > # for backwards compatibility > RException = RPyException > > I wonder why your code looks totally different, why you have > # The new exception > RException = _rpy.RException > > That code doesn't even appear in my rpy.py. > > > > > > > [EMAIL PROTECTED] ~]$ gcc --v > > Using built-in specs. > > Target: i686-pc-linux-gnu > > Configured with: ../configure --prefix=/usr --enable-shared --enable- > > languages=c,c++,objc --enable-threads=posix --enable-__cxa_atexit -- > > disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable- > > clocale=gnu --disable-libstdcxx-pch --with-tune=generic > > Thread model: posix > > gcc version 4.2.2 > > > That's current Arch Linux, kernel 2.6.23.9 (stock distribution kernel) > > and gLibc 2.7, my machine is 32bit Athlon Barton, exactly it's: > > > [EMAIL PROTECTED] ~]$ cat /proc/cpuinfo > > processor : 0 > > vendor_id : AuthenticAMD > > cpu family : 6 > > model : 10 > > model name : AMD Athlon(tm) XP 2600+ > > stepping: 0 > > cpu MHz : 2091.122 > > cache size : 256 KB > > fdiv_bug: no > > hlt_bug : no > > f00f_bug: no > > coma_bug: no > > fpu : yes > > fpu_exception : yes > > cpuid level : 1 > > wp : yes > > flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge > > mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up ts > > bogomips: 4186.91 > > clflush size: 32 > > > > (2) Could you send the build log for building R (i.e., the end of > > > SAGE_ROOT/install.log)? > > > it's not shortest so I've put it on net, it looks ok... it's at > >http://giniu.ravenlord.ws/install.log- I renamed old log and did sage > > -f r-2.6.1.p6 to be sure only needed lines are included > > > > (3) If you type > > >sage: !R > > > what happens? > > > R console starts, I can do for example hist(rnorm(1000)) so I can say > > it mostly works... > > > > --William > > > cheers, > > Andrzej. > > -- > William Stein > Associate Professor of Mathematics > University of Washingtonhttp://wstein.org --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: SAGE-2.8.15!
On 10 Gru, 19:57, "William Stein" <[EMAIL PROTECTED]> wrote: > On Dec 10, 2007 10:50 AM, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote: > > > > > > > Hi, > > > I've seen that R moved from experimental to optional, now as > > r-2.6.1.p6, tryied it but got: > > > sage: import rpy > > --- > > Traceback (most recent call > > last) > > > /home/giniu/ in () > > > /opt/sage/local/lib/python2.5/site-packages/rpy.py in () > > 171 > > 172 # The new exception > > --> 173 RException = _rpy.RException > > 174 > > 175 # I/O setters > > > : 'module' object has no attribute > > 'RException' > > > that can be known issue but I decided I will report... :) > > Thanks. However: > (1) What operating system are you using exactly, and what gcc version? to be most specific... [EMAIL PROTECTED] ~]$ gcc --v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../configure --prefix=/usr --enable-shared --enable- languages=c,c++,objc --enable-threads=posix --enable-__cxa_atexit -- disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable- clocale=gnu --disable-libstdcxx-pch --with-tune=generic Thread model: posix gcc version 4.2.2 That's current Arch Linux, kernel 2.6.23.9 (stock distribution kernel) and gLibc 2.7, my machine is 32bit Athlon Barton, exactly it's: [EMAIL PROTECTED] ~]$ cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 10 model name : AMD Athlon(tm) XP 2600+ stepping: 0 cpu MHz : 2091.122 cache size : 256 KB fdiv_bug: no hlt_bug : no f00f_bug: no coma_bug: no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up ts bogomips: 4186.91 clflush size: 32 > (2) Could you send the build log for building R (i.e., the end of > SAGE_ROOT/install.log)? it's not shortest so I've put it on net, it looks ok... it's at http://giniu.ravenlord.ws/install.log - I renamed old log and did sage -f r-2.6.1.p6 to be sure only needed lines are included > (3) If you type >sage: !R > what happens? R console starts, I can do for example hist(rnorm(1000)) so I can say it mostly works... > --William cheers, Andrzej. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: SAGE-2.8.15!
Hi, I've seen that R moved from experimental to optional, now as r-2.6.1.p6, tryied it but got: sage: import rpy --- Traceback (most recent call last) /home/giniu/ in () /opt/sage/local/lib/python2.5/site-packages/rpy.py in () 171 172 # The new exception --> 173 RException = _rpy.RException 174 175 # I/O setters : 'module' object has no attribute 'RException' that can be known issue but I decided I will report... :) best regards, Andrzej. On 4 Gru, 16:40, "William Stein" <[EMAIL PROTECTED]> wrote: > On Dec 4, 2007 6:25 AM, gginiu <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > There already is an optional/experimental R.spkg and because of rpy > > > little integration work into Python needs to be done. It will probably > > > take a while to expose all the functionality desired by Sage > > > developers directly, but we need to start by including it. > > > well, then if there is anything I can help with - from testing to > > whatever - you can count me in :) I'm already downloading it :) > > Please type > > sage: install_package('sage -i r-2.6.1rc.p1') > > and report back whether the install works for you or not (it's an experimental > package still, which means that it's likely to *not* work for a lot of > people). > > If it does install, try this: > > sage: import rpy > sage: rpy.r.t_test(range(100)) > > Check out > rpy.sourceforge.net > for more discussion about rpy, which provides a very > fast interface to essentially all the functionality of R. > NOTE: As of now, you'll probably want to do > sage: RealNumber = float; Integer = int > to turn off preparsing of floats and ints when using R, since > the patch for making R play nicely with Sage types isn't in > yet. > > William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: SAGE-2.8.15!
I don't actually know, but as I mentioned before, even when I run version from that package outside of sage, I get that error about X11... --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: SAGE-2.8.15!
> I was able to get the image to work last time I tried, so it's definitely > possible. when I do sage: r.png() I get: : Error in function (filename = "Rplot %03d.png", width = 480, height = 480, : X11 is not available and well.. that's both from console and notebook, and from plain R /opt/sage/local/bin/R... just like if it was compiled without graphics support, probably it could work if --with-x11 or so... and it seem it's the case because of hack from spkg-install: # I have problems with this on OSX Intel 10.5.1 -- for now just turn it off. # It will be good to get something fully working before worrying about X. #if [ -f /usr/include/X11/Xwindows.h ]; then #XSUPPORT=yes #else XSUPPORT=no #fi so from it I guess images are left for later :) as I'm on Linux I will uncomment this to test them. regards, Andrzej. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: SAGE-2.8.15!
WooHoo :) that's great news... I'm just upgrading it to look around asap... :) btw, is it really true that R interface is so-almost-ready that it could be included in release planned for end of week so in few days? I would be quite amazed to see it so soon :) regards, Andrzej Giniewicz. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: sage 2.8.13: g0n - cremona.spkg failed to build, 32bit linux, gcc-4.2.2
Great work, that error is no longer here :)... I'm still compiling other packages so if there will be any further problems I will report back, but it is already after last time critical point... sorry for long reply and no log, I was really busy with my tasks and today checked list first time from posting... best regards, Andrzej. On 24 Lis, 04:02, mabshoff <[EMAIL PROTECTED] dortmund.de> wrote: > On Nov 23, 9:15 pm, "John Cremona" <[EMAIL PROTECTED]> wrote: > > > I am currently making sure that my code compiles ok with gcc 4.2.1 and > > will upload a patch so this will be fixed soon. > > > John Cremona > > Ok, an updated spkg that merges John's changes is at > > http://sage.math.washington.edu/home/mabshoff/cremona-20071124.spkg > > I had some slight merge conflicts that I did resolve. It builds an > passes doctests on sage.math. Please try this on systems with gcc > 4.2.x and report back. > > Cheers, > > Michael --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] sage 2.8.13: g0n - cremona.spkg failed to build, 32bit linux, gcc-4.2.2
Hi, I seen in announcement that it fails for "cremona.spkg fails to compile on Linux/Itanium with older gcc and also Solaris." - but my system doesn't fall to that category I think so I decided to report... not counting plenty (281) warnings in file curvesort.cc (about deprecated conversion from string constant to 'char*') I also get WHOLE lot (about 8000) errors all in one nature: ../g0n/curvesort.cc:106: error: jump to case label ../g0n/curvesort.cc:105: error: crosses initialization of 'int [3]' with different numbers only... problems starts from: g++ -c -fPIC -g -O2 -DNEW_OP_ORDER -DUSE_PARI_FACTORING -I../include - DNTL_ALL -I/opt/sage/local/include -I/opt/sage/local/include tsat3.cc -o tsat3_n.o In file included from tsat3.cc:37: ../g0n/curvesort.cc ... etc etc I think there is no sense to attach such big report... I'm running current Arch Linux, that is GCC 4.2.2, gLibc 2.7, kernel 2.6.23.8. Is there some workaround? anyway thanks for great software, can't wait till there will be R interface - it will for sure make Sage the software of choice for many :) best regards, Andrzej Giniewicz. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---