setwd() function in R does not work in Sage
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?
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.
No they were in separate cells. Putting the two commands in one cell works. Thanks for the clarification. Now it makes sense.