Re: [R] Error in setwd(dir) when initializing R
On Mon, 20 Nov 2023 12:18:11 +0100 Ana de las Heras Molina wrote: > Error in setwd(dir) : no es posible cambiar el directorio de trabajo If you run traceback() first thing after getting this error, does it say anything useful? (Anything besides "No traceback available" would count as useful.) Do you have a file named .RData in your home directory? If yes, it may help to move it away (or remove it if you don't use the saved session). -- Best regards, Ivan __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error in setwd(dir) when initializing R
I think that you may be correct about OneDrive being related. I have seen OneDrive associated with problems before. What happens if you manually set the working directory to that location? Does it work if your default home directory is local to your machine? > On Nov 20, 2023, at 6:18 AM, Ana de las Heras Molina wrote: > > [You don't often get email from andel...@ucm.es. Learn why this is important > at https://aka.ms/LearnAboutSenderIdentification ] > > Hello, > I am Ana de las Heras, and I write to you because every time I open RStudio > or R directly I have the following message, before I can do anything at > all: > > Error in setwd(dir) : no es posible cambiar el directorio de trabajo > > > At first I didn't pay much attention to it, but I am having lots of > troubles with different programs, including LinDa, ANCOMBC or Genome > InfoDbdata (and thus, phyloseq). After asking in the different forus of > each program, they have told me that the issue is more related to my R > installation and that first message I obtain when I start the program. > > I would be very grateful if someone could help me. This issue started when > I installed the latest version of R (4.3.1. and now 4.3.2.). I have already > uninstalled and reinstalled both programs, as well as Rtools. I am not sure > if the issue could be related to ONe Drive, since the HOME folder is in > OneDrive. I am currently working on Windows 10, 64 bits. > > Yours faithfully, > Ana > -- > *Ana de las Heras Molina* > > > Nutrición Animal > Departamento de Producción Animal > Facultad de Veterinaria > Universidad Complutense de Madrid > > *Contacto*: 913943855/anaher...@ucm.es > >[[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Error in setwd(dir) when initializing R
Hello, I am Ana de las Heras, and I write to you because every time I open RStudio or R directly I have the following message, before I can do anything at all: Error in setwd(dir) : no es posible cambiar el directorio de trabajo At first I didn't pay much attention to it, but I am having lots of troubles with different programs, including LinDa, ANCOMBC or Genome InfoDbdata (and thus, phyloseq). After asking in the different forus of each program, they have told me that the issue is more related to my R installation and that first message I obtain when I start the program. I would be very grateful if someone could help me. This issue started when I installed the latest version of R (4.3.1. and now 4.3.2.). I have already uninstalled and reinstalled both programs, as well as Rtools. I am not sure if the issue could be related to ONe Drive, since the HOME folder is in OneDrive. I am currently working on Windows 10, 64 bits. Yours faithfully, Ana -- *Ana de las Heras Molina* Nutrición Animal Departamento de Producción Animal Facultad de Veterinaria Universidad Complutense de Madrid *Contacto*: 913943855/anaher...@ucm.es [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error in setwd("dir") :
Hello, Inline. Em 05-08-2017 15:55, ? ? escreveu: Hello, I got some of the R source code and not being able to Run it If you have the source code, why can't you change it and replace that "dir" with yours, as returned by getwd()? Hope this helps, Rui Barradas in RStudio. I get the error: Error in setwd("dir") : cannot change working directory I have gone through forums but nothing seemed relevant to my issue. What bugs me the most is the ("dir") that the error shows, is of those who wrote the source code and not mine(it still sees the directory of their computer, even though, I have changed all the directories). When I write getwd(), it dispalys my "dir". Does anyone have any ideas on what's going on here? Thank you -- Greg Lyukshin [[alternative HTML version deleted]] [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error in setwd("dir") :
On 05/08/2017 10:55 AM, ? ? wrote: Hello, I got some of the R source code and not being able to Run it in RStudio. I get the error: Error in setwd("dir") : cannot change working directory I have gone through forums but nothing seemed relevant to my issue. What bugs me the most is the ("dir") that the error shows, is of those who wrote the source code and not mine(it still sees the directory of their computer, even though, I have changed all the directories). When I write getwd(), it dispalys my "dir". Does anyone have any ideas on what's going on here? Try sourcing it with "echo=TRUE", so you can see which line is causing the problem. Presumably some part of the code still references a particular directory. If you are loading binary objects (e.g. using load() or readRDS()), they may trigger code to run that may still have a directory coded. But more likely you've just missed fixing something. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error in setwd("dir") :
Did you put the directory in quotes with forward slashes? Please show command used. Sent from my iPhone > On Aug 5, 2017, at 1:10 PM, ? ? wrote: > > Hello, I got some of the R source code and not being able to Run it in > RStudio. > I get the error: > > Error in setwd("dir") : > cannot change working directory > > > I have gone through forums but nothing seemed relevant to my issue. > What bugs me the most is the ("dir") that the error shows, is of those who > wrote the source code and not mine(it still sees the directory of their > computer, even though, I have changed all the directories). > When I write getwd(), it dispalys my "dir". > Does anyone have any ideas on what's going on here? > Thank you > > > -- > Greg Lyukshin > >[[alternative HTML version deleted]] > >[[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Error in setwd("dir") :
Hello, I got some of the R source code and not being able to Run it in RStudio. I get the error: Error in setwd("dir") : cannot change working directory I have gone through forums but nothing seemed relevant to my issue. What bugs me the most is the ("dir") that the error shows, is of those who wrote the source code and not mine(it still sees the directory of their computer, even though, I have changed all the directories). When I write getwd(), it dispalys my "dir". Does anyone have any ideas on what's going on here? Thank you -- Greg Lyukshin [[alternative HTML version deleted]] [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error in setwd(dir) : cannot change working directory
Unless you have a subdirectory called "dir" below the directory returned by getwd(), the command you gave would be expected to fail. Perhaps you should use an absolute directory specification? --- Jeff Newmiller The . . Go Live... DCN: Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --- Sent from my phone. Please excuse my brevity. Greg Lyukshin wrote: Hello, I got some of the R source code and not being able to Run it in RStudio. I get the error: Error in setwd("dir") : cannot change working directory I have gone through forums but nothing seemed relevant to my issue. What bugs me the most is the ("dir") that the error shows, is of those who wrote the source code and not mine(it still sees the directory of their computer, even though, I have changed all the directories). When I write getwd(), it dispalys my "dir". Does anyone have any ideas on what's going on here? Thank you -- Greg Lyukshin [[alternative HTML version deleted]] _ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Error in setwd(dir) : cannot change working directory
Hello, I got some of the R source code and not being able to Run it in RStudio. I get the error: Error in setwd("dir") : cannot change working directory I have gone through forums but nothing seemed relevant to my issue. What bugs me the most is the ("dir") that the error shows, is of those who wrote the source code and not mine(it still sees the directory of their computer, even though, I have changed all the directories). When I write getwd(), it dispalys my "dir". Does anyone have any ideas on what's going on here? Thank you -- Greg Lyukshin [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.