Ask Your Question

dartdog's profile - activity

2019-01-19 16:57:33 +0100 received badge  Famous Question (source)
2017-12-27 00:40:59 +0100 received badge  Famous Question (source)
2016-09-28 04:44:32 +0100 received badge  Notable Question (source)
2016-09-16 00:33:29 +0100 received badge  Notable Question (source)
2016-01-06 22:25:48 +0100 received badge  Nice Question (source)
2016-01-06 22:24:27 +0100 received badge  Popular Question (source)
2015-06-21 12:32:06 +0100 received badge  Popular Question (source)
2014-06-29 03:14:45 +0100 marked best answer How to use R with Sage?

Just loaded the Sage system, went through tutorial (very quickly) searched around, I see it says it has R but I don't see any reference to it in any docs?? I was hoping to use Sage as A notebook type interface to R? mainly for doing exploratory data analysis or something like that...

2013-05-04 06:32:51 +0100 received badge  Notable Question (source)
2013-04-23 07:28:27 +0100 received badge  Great Question (source)
2013-02-26 19:36:10 +0100 received badge  Famous Question (source)
2012-10-26 01:06:09 +0100 marked best answer How to use R with Sage?

If you start the Sage notebook, you can set the "system" of the notebook R by selecting "r" on the system dropdown. (The system dropdown is located toward the top of the screen in the notebook just to the right of the dropdown labeled "Data...". Initially, it will be set to "sage".)

Additionally, you can set the system of an individual cell to R by putting "%r" at the top of the cell.

When in R-mode, all of the commands that you enter into the notebook will be sent directly to a copy of R. For example, you can evaluate the following in the notebook:

a <- c(1,2,3);
a*2

to get the output

[1] 2 4 6

If you want to use R to do plotting in the notebook, then you need to use the PNG device. Here is some code that produces a basic plot:

png(file="myplot.png", bg="transparent")
plot(1:10)
rect(1, 5, 3, 7, col="white")
dev.off()

When R writes the image to a file, the notebook detects that a file has been created and displays it in the notebook.

2012-10-07 21:27:27 +0100 received badge  Notable Question (source)
2012-10-02 18:09:45 +0100 received badge  Good Question (source)
2012-08-20 12:01:51 +0100 received badge  Popular Question (source)
2012-08-12 14:31:13 +0100 received badge  Popular Question (source)
2012-08-02 12:44:10 +0100 received badge  Popular Question (source)
2012-07-25 15:01:05 +0100 received badge  Famous Question (source)
2012-05-16 18:16:33 +0100 received badge  Nice Question (source)
2011-12-20 09:26:56 +0100 received badge  Notable Question (source)
2011-09-11 11:08:09 +0100 received badge  Popular Question (source)
2011-08-22 22:51:56 +0100 commented question update sage, best practice?

Thanks,, I hope to get to it shortly, would be nice if that info was somehow displayed a bit more prominently in the release notes :-)

2011-08-22 22:50:25 +0100 marked best answer update sage, best practice?

If you are downloading the pre-built Sage binaries, just move the old sage directory for 4.6.1 out of the way (mv sage sage.OLD) and unpack the new sage-4.7.1 in the parent where the old installtion was (in case you have scripts or aliases that refer to that installation.

This won't affect your sage notebook account or your saved notebooks since those are saved in your ~/.sage directory.

2011-08-21 19:12:51 +0100 asked a question update sage, best practice?

Have 4.6.1 installed thinking of updating to 4.7.1 on Ubuntu 10.10 what is best practice? can I just re-install over current?

2011-05-28 11:06:32 +0100 asked a question Any possibility to import/use orange in sage?

Orange, a Python Visual programming package would be very interesting package to incorporate into Sage, has anyone done anything in this direction?

2011-04-30 12:48:23 +0100 received badge  Supporter (source)
2011-04-30 12:46:36 +0100 commented answer Sage relation to Python

That helps a lot. It fills in a few missing pieces for me! So it seems that I could have Vim open side by side and use Sage as the execution environment, much like I'm doing with Ipython now...

2011-04-30 12:45:41 +0100 marked best answer Sage relation to Python

The Sage notebook doesn't replace a good text editor. It's fantastic for writing 'on the fly' code and for calling pre-written functions, but as far as I know, there's no handy GUI in the notebook for opening, manually editing and saving .py files.

There is, however, very neat support for executing .py and .sage files. The load and attach commands are explained in the tutorial and work both for .sage files and for .py files. attach will automatically reload the file every time it is changed. The preparser is not called for .py files, so you have to import any sage functions that you want to use.

You can set the path for load and attach using load_attach_path.

2011-04-30 02:35:54 +0100 asked a question Sage relation to Python

Bear with me here.. I'm still struggling to use regular Python with Idle Ipython and the like.. And also Sage.

What I'm not real clear on is if I can treat Sage Notebook as another Python Development environment?

If so how do I save and recall, execute and edit plain .py files in Sage.. I've probably just missed it?

2011-04-15 14:11:22 +0100 asked a question Loading and analyzing data, Datamining

I am considering using Sage as a data-mining type tool. Is this way off base? If so where should I head? I do not see much in the reference docs on loading and interfacing with large-ish datafiles? As well as cleaning, standardizing and faceting the data.

In particular I have a 18mg compressed CSV file that expands to at least 512 mg.. It has about 20 fields per record and 400,000 or so records (it is Residential Real Estate listing data) I need to summarize, average and count by area, subdivision and dates (and more) I had been using An Access database, but am looking to move to Python, and avoid an SQL structure if possible, since now it seems we have enough memory to hold the data in memory..

My brief search has not turned up any similar examples?? At the least any pointers to loading the compressed CSV? and guidance on the right Python/Sage Data structures to start off with?

2011-02-10 03:56:33 +0100 received badge  Good Question (source)
2011-02-06 09:14:20 +0100 received badge  Nice Question (source)
2011-02-05 17:51:11 +0100 asked a question terminate notebook and session, The right way?

When I start up the notebook interface, the terminal session then is dedicated to the server and sage instance, and does not take input, so far the only way to terminate it is via ctl-c or otherwise close the terminal. I assume if I do this after exiting my browser/notebook session that that is the correct way?

The ctl-d quit and exit commands specified for the terminal mode do not seem to work if you use the notebook?

Checked the docs and could not find a reference to shutting down the notebook, and session.

2011-02-03 11:50:34 +0100 commented answer How to use R with Sage?

Thank you both I'll give it a go shortly