Ask Your Question

Dug_the_Math_Guy's profile - activity

2016-08-24 12:14:14 +0100 received badge  Famous Question (source)
2015-01-13 21:37:10 +0100 received badge  Notable Question (source)
2014-04-14 08:33:51 +0100 received badge  Famous Question (source)
2014-04-11 00:16:24 +0100 received badge  Popular Question (source)
2013-11-22 10:17:00 +0100 received badge  Notable Question (source)
2013-03-19 16:53:29 +0100 received badge  Popular Question (source)
2013-01-07 07:04:08 +0100 received badge  Nice Question (source)
2012-05-17 22:26:32 +0100 received badge  Teacher (source)
2012-05-17 22:26:32 +0100 received badge  Self-Learner (source)
2012-05-17 18:31:44 +0100 answered a question R through Sage giving errors: Error: object 'sage3' not found

No worries, I actually was able to figure it out from a FAQ at http://wiki.sagemath.org/R There is a syntactical issue with using R through sage which apparently still hasn't been fixed in Sage 4.8 where you need to use single quotes to tell python to pass a string to R but then R expects a double quoted string, so you have to use single quotes around double quotes:

see: http://trac.sagemath.org/sage_trac/ticket/2963 so my

r.read_table(header=True, text = "a b 1 2 3 4") should be:

r.read_table(header=True, text = '"a b 1 2 3 4"') and when I use that syntax it works! I get:
[1] a b X1 X2 X3 X4 <0 rows> (or 0-length row.names) just like in pure R

the other example works too: r.read_csv(DATA+'transaction_data.csv',header=True) but here I am using DATA as a python string variable that is the path to my data file attached to the Sage notebook it needs the double quotes inside single quotes as well as the file name. I just did

sage: print DATA

/home/math_guy/.sage/sage_notebook.sagenb/home/admin/1/data/ and just copy and pasted the path and filename into the hybrid syntax:

r.read_csv('"/home/math_guy/.sage/sage_notebook.sagenb/home/admin/1/data/transaction_data.csv"',header=True)

and it worked perfect

I'm not even annoyed to use strange syntax after thinking it was problems with my Sage install ;-)

2012-05-16 23:42:14 +0100 answered a question R through Sage giving errors: Error: object 'sage3' not found

another clue: the problem appear to be with Sage's interface to R since when I run the notebook in the pure R mode and alter the syntax of the latter comment above I don't get an error ( even though it looks like I got 0 rows in my table since I apparently need to inform R where my EOL's are ):

read.table(header=TRUE, text = "a b 1 2 3 4")

[1] a b X1 X2 X3 X4 <0 rows> (or 0-length row.names)

2012-05-16 23:31:49 +0100 answered a question R through Sage giving errors: Error: object 'sage3' not found

I forgot to mention: I am getting these errors through the notebook

2012-05-16 23:30:14 +0100 answered a question having trouble with multi core support on 64bit Sage 4.8 on an Ubuntu 10 guest under VMWare Workstation 7
2012-05-16 23:29:26 +0100 asked a question R through Sage giving errors: Error: object 'sage3' not found

I am trying to use R through Sage and I have read about how the interface works so I think I am entering in the right code. I have tried this on two different computers and get the same errors. One is an quad core 64 bit Ubuntu 10 guest on VMWare Workstation 7 with host Win 7 the other is a single core 32bit Ubuntu 12 pure Linux install when I access R methods I get errors of the form:

Error: object 'sageX' not found where X is a number between 0 and 3

examples:

r.read_csv(DATA+'transaction_data.csv',header=True)
Error: object 'sage2' not found

and

r.read_table(header=True, text = "a b 1 2 3 4") Error: object 'sage3' not found

I did find a trac that seems to be related to the error I'm getting: http://trac.sagemath.org/sage_trac/ticket/839 But this is from 4 years ago, this issue must have been taken care of by now right? I'm using Sage 4.8

Let me know if you have any idea how to fix this or if there might be something I did wrong during the installation

Doug

2012-05-16 23:15:54 +0100 answered a question having trouble with multi core support on 64bit Sage 4.8 on an Ubuntu 10 guest under VMWare Workstation 7

OK, it looks like everything I thought was wrong. I am having the same problem running R through Sage with another computer that has a single processor, 32 bits and is running Ubuntu 12 without a virtual machine. So now its a completely different question and it appears to have to do with the Sage - R interface ( although I could be completely wrong again ). I think it makes sense to start a new question since the title to this one is completely irrelevant and misleading now. Hope that's not violating any principles of this forum.

2012-05-16 22:33:34 +0100 asked a question having trouble with multi core support on 64bit Sage 4.8 on an Ubuntu 10 guest under VMWare Workstation 7

Hi Sage people, I installed Ubuntu 10.04 LTS desktop as a guest virtual machine under WIndows 7 as host on a 64-bit quad core with a Sandy Bridge i7 CPU. Like VMWare suggests I choose the number of processors as 4 when I set up the virtual machine ( it actually has 4 physical processors but they use hyper threading so it has 8 logical processors ) Everything has run fine so far but when I set up Sage 4.8 from a binary installation, I get errors like this: Error: object 'sage2' not found except the number after sage varies ( I believe it goes from 0 to 3 ) These errors seem to happen when I try to access R through Sage notebooks, I'm not positive they are limited to this context. I am new to Sage but as far as I can tell this means it is having trouble supporting the multiple cores. There should be objects sage0,sage1,sage2,sage3 that run on different cores? Am I right so far? If so, does anybody know why I am having issues like this? Is it possible I installed it wrong? Or is it more of an issue of Sage running under a VMWare Workstation VM? Any thoughts would help. Doug

2012-04-13 16:01:03 +0100 received badge  Notable Question (source)
2011-09-09 07:41:59 +0100 received badge  Popular Question (source)
2011-03-18 16:37:53 +0100 received badge  Student (source)
2011-03-18 16:35:33 +0100 asked a question Mac OS vs Ubuntu for high performance computing

Hi I am considering investing in a new PC which I'll be using Sage ( and R under Sage ) a lot and will be doing computations that will be intensive at times. I am considering either Mac Snow Leopard with a new quadcore MacBook or the latest Ubuntu running on a partition on a quad core Windows 7 machine. I would like to know what differences there might be running Sage on these two platforms, with special interest toward performance. I'm just getting involved with Sage but have to make a decision about hardware and OS very soon. Any info would be much appreciated. Doug