Ask Your Question
0

setwd() function in R does not work in Sage

asked 2015-06-28 01:02:11 +0100

NahsiN gravatar image

Hello, I am trying to use setwd() for R in the sage notebook to set the current working directory. But it does not seem to work. I get the following

setwd("/home/foo/Code/")
getwd()   
[1] "/tmp/tmpR8Ukt0"

So as shown, the setwd() command has no effect. Any suggestions?

edit retag flag offensive close merge delete

Comments

Is it all in the same cell? That's the only way I could imagine this working, as sagenb (by design) uses temp directories to actually evaluate each cell.

kcrisman gravatar imagekcrisman ( 2015-06-28 05:30:49 +0100 )edit
1

No they were in separate cells. Putting the two commands in one cell works. Thanks for the clarification. Now it makes sense.

NahsiN gravatar imageNahsiN ( 2015-07-17 00:00:28 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-07-25 15:05:26 +0100

kcrisman gravatar image

See comments: this would only work in the same cell.

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

1 follower

Stats

Asked: 2015-06-28 01:02:11 +0100

Seen: 594 times

Last updated: Jul 25 '15