ff package on a server... read.table.ffdf "cannot change working directory"
Asked Answered
R

2

8

This may be something simple but I have search a LOT and can't find how to fix it.

I am using Rstudio 2.15.1 on a server because we use big data sets and the server has more ram to deal with it. I want to load a csv file with

x <- read.csv.ffdf(file=file.path(getwd(),"test.csv"))

from the "ff" package and in the pc it works fine, but in the server I get the message

Error in setwd(dfile) : cannot change working directory

Does anyone has any idea on how can I fix this?

Rushing answered 31/1, 2013 at 15:50 Comment(0)
M
15

I think this has to do where ff stores the ff files. It stores these files in getOption("fftempdir"). Do you have access to that directory? Maybe your permissions on the server don't allow you to have access to that folder? In that case set options(fftempdir = "path/to/your/folder") to a folder where you have access to.

Mattie answered 31/1, 2013 at 16:49 Comment(1)
Using ff on my local machine, and I'm admin. Sounds like ff is doing something dumb.Eph
D
0

I had this problem today. Instead of setting the options(fftempdir = ...) I just did:

dir.create(getOption("fftempdir"))

And it solved the problem. I do not know why I had to do it, but it worked.

PS: First I checked that the getOptions("fftempdir") was really a directory in the /tmp/ drive and that I did not cared if it would be deleted or not.

Dogma answered 14/7, 2022 at 15:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.