Ask Your Question
0

How can I import CSV files in Sagemath Cloud?

asked 2014-04-16 00:46:07 -0500

Dan-Erik gravatar image

updated 2015-01-13 11:08:36 -0500

FrédéricC gravatar image

I was trying out Sagemath Cloud. Looks great, good job. But I have a problem because I can't figure out how to import CSV files with data.

I am using R (%default_mode r) to do some basic statistics and stuff in a worksheet. I already have the script working on my local machine, but I wanted to try it in the Cloud too.

What I did was that I drag-and-dropped a couple of CSV files into a project. Seems to work fine; the files appear in the drag-and-drop area, and a progress indicator goes to full and then a green check-mark appears. But after that, the files are not present in the Files section, there is only my worksheet. In the Log section, there is only mention of me opening the worksheet, it says nothing about successfully uploading files. When I try to run an import command in the worksheet, I get "No such file or directory".

The import command I used:

data <- read.csv("filename.csv", header=TRUE, sep=';')

EDIT:

This question has an answer for how to do it in Python. But I am doing it from R, and I reckon the python function os.environ() is not available.

EDIT 2:

If I go to the terminal line under Files and type "ls -A" I can get a full list of files in my project, but the CSV files that I dragged-and-dropped are not in the list.

edit retag flag offensive close merge delete

Comments

I'm not aware of any bugs in file upload. What is the project id (in the URL)? Maybe the files are there and you're looking in the wrong place? Also, exactly what browser are you using? What happens if you try to upload the files with a different browser. wstein@uw.edu

William Stein gravatar imageWilliam Stein ( 2014-04-21 04:44:22 -0500 )edit

The project ID I guess is f933d7f4-4150-4b5c-8863-d68f50460591. Sorry for late reply, I just went back to my native sage installation and forgot about this... I am using Chromium in the Ubuntu linux environment. Specifically Version 33.0.1750.152 Ubuntu 13.10 (256984).

Dan-Erik gravatar imageDan-Erik ( 2014-05-05 23:55:20 -0500 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2014-04-16 06:04:49 -0500

Dan-Erik gravatar image

updated 2014-04-16 06:05:13 -0500

This is not an answer, but a workaround. Putting it here just in case no one comes up with a real solution.

Since I own a webserver, I put the file there. Then I can call it from R and import the data. Quite different from using files within the sagemath cloud, but it works to import the data into my cloud worksheet.

data <- read.csv(file="http://share.website.com/filename.csv", header=TRUE, sep=';')
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2014-04-16 00:46:07 -0500

Seen: 1,898 times

Last updated: Apr 16 '14