similar to: Error in setwd("dir") :

Displaying 20 results from an estimated 10000 matches similar to: "Error in setwd("dir") :"

2011 Aug 31
1
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
2012 Nov 02
3
Strange behaviour of setwd/getwd
I've found the following strange behaviour R (RStudio) which has been confirmed by another user in RGui. Inside a script I want to set two variables: default.wd = getwd() tmp.wd = setwd(choose.dir()) After choosing tmp.wd the value of default.wd is shown in Workspace, but getwd() is giving back the correct string of tmp.wd. Is there a workaround for the problem? I'm working on
2023 Nov 21
1
[External] Re: Error in setwd(dir) when initializing R
Dear Ana When you installed R it gave you an option to put a shortcut on the desktop. If you did that then you can start the R GUI by clicking on it. You may need to customise it for your preferences. Specifically it starts R with an option cd-user-docs which I delete and I then alter the starting option to start in the directory I want. You may have different preferences of course. Try
2009 Oct 30
1
.Rprofile replacement function setwd() causing errors
In my .Rprofile I have the following functions which display the current directory in the main R window title bar, and modify base::setwd() to keep this up to date. I like this because I can always tell where I am in the file system. cd <- function(dir) { base::setwd(dir) utils::setWindowTitle( short.path(base::getwd()) ) } short.path <- function(dir, len=2) { np
2017 Jul 14
3
setwd in windows
Dear friends - windows R 3.3.3 - sorry to ask a simple question - but I cannot make setwd work properly in scripts In the example below I have made a directory in C (firstdir) and a directory in that (secdir) and the intention is to change directory to the second from the first - it works when I put the entire path but not the tilde - what am I missing? I was around rwf 2.14 as per the help
2023 Nov 20
2
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,
2012 Jul 30
1
locked binding of setwd() in R 2.15.x causes .Rprofile to fail
[Env: Win XP, R 2.14.2, R 2.15.0] I have a replacement function for setwd() in my .Rprofile which displays the current R path in the R window title. It no longer works in R 2.15.x, giving the error below. Worse, the error prevents the rest of my .Rprofile script from completing. Is there some way to rescue this, i.e., preserve this behavior in R 2.15? If not, how can I modify my script so it
2013 Feb 07
1
assignInNamespace to create a setwd() replacement: how to use unlockBinding()?
In my .Rprofile for Windows, I had the following functions defined to mirror a few features I miss from linux: (a) replace setwd() with a version that stashes the current directory so it can be easily restored (b) writes a short version of the current R directory to the Windows title bar: I can always see where I am, with multiple Rgui windows. (c) creates a cd() shorthand for setwd(), but
2018 Mar 22
3
exporting data to stata
Hi, I am new to R and I want to export data into Stata. Could somebody help with that? Thanks a lot. This is the code I am using: > setwd("D:/datasets/Seg-bcn/ESBD") > data1 <- readRDS("r17045_ESDB_Habitatges_BDD_V_1_0.rds") > library(foreign) > write.dta(data="data1", file = "D:/datasets/data1.dta") Error in write.dta(data =
2013 Feb 20
4
Error in setwd(outDir) : cannot change working directory
I installed R on my Windows laptop in C:\Program Files\R\R-2.15.2 and am able to open RGUI (640bit), see packages and run commands. However, when I test the installation and run the basic tests and all the tests on the standard and recommended packages i.e.: library("tools") testInstalledBasic("both") testInstalledPackages("base", errorsAreFatal
2012 Feb 26
2
Help needed! Error in setwd(newdir) : cannot change working directory
Hi Guys, I am new to R and just trying to write a small script to automate a couple commands. But I run into the setwd(): cannot change working directory. I googled a little bit and tried all fixes/suggestions with no success. Basically I have a script that works from inside a directory with my data (/home/sean/Rtest/Data01). Now I want to modify the script to make it run from the upper directory
2011 Feb 15
24
editores en windows
Hola a todos. En linux uso rkward o gedit con el plugin Rgedit, pero me gustaría saber qué editores se pueden usar en windows. He probado Tinn-R , ¿qué usáis vosotros? Gracias
2023 Nov 20
1
Error in setwd(dir) when initializing R
On Mon, 20 Nov 2023 12:18:11 +0100 Ana de las Heras Molina <andelash at ucm.es> 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,
2024 Dec 18
2
Query concerning working directory for file.choose()
I've been working on a small personal project that needs to select files for manipulation from various directories and move them around in planned ways. file.choose() is a nice way to select files. However, I've noticed that if file.choose() is called within a function, it is the directory from which that calling function has been invoked that is displayed by file.choose(). This is not
2024 Dec 18
2
Query concerning working directory for file.choose()
Try choose.files choose.files(default = file.path(mydir, "*.*"), multi = FALSE) On Wed, Dec 18, 2024 at 10:33?AM J C Nash <profjcnash at gmail.com> wrote: > > I've been working on a small personal project that needs to select files for manipulation from > various directories and move them around in planned ways. file.choose() is a nice way to select > files.
2018 Mar 22
0
exporting data to stata
Hi , library(foreign) write.dta(data1, "data1.dta") should work. The file will be saved in the working directory. Use getwd() to know the working directory. Best wishes Amalraj Raja -----Original Message----- From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of rosario scandurra Sent: 22 March 2018 07:47 To: r-help at r-project.org Subject: [R] exporting data to stata
2010 Jun 11
4
setting the current working directory to the location of the source file
AFAIK a script run through source() does not have any legit way to learn about it's own location. I need this to make sure that the script will find its datafiles after I move the whole directory. (The datafiles are in the same directory.) Here is a hack I invented to work around it: print(getwd()) source_pathname = get("ofile",envir = parent.frame()) source_dirname =
2018 Mar 22
1
exporting data to stata
On Thu, Mar 22, 2018 at 4:52 AM, Raja, Dr. Edwin Amalraj <amalraj.raja at abdn.ac.uk> wrote: > Hi , > > library(foreign) > write.dta(data1, "data1.dta") > > should work. I don't think so: > library(foreign) > example(svydesign) > write.dta(dstrat, "~/Downloads/foo.dta") Error in write.dta(dstrat, "~/Downloads/foo.dta") : The
2008 Apr 24
4
bug in file.path?
Se ha borrado un texto insertado con un juego de caracteres sin especificar... Nombre: no disponible Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080424/2226f24e/attachment.pl
2011 Jun 28
2
Loop through each subject
R help - I am attempting to write a script that has multiple subjects in 1 data file. Each subject has multiple rows with columns as variables. Here is my code, I am having problem executing it on each unique subject id (dat$Subject). getwd() setwd("/Users/edwardpatzelt/Desktop/Neuroimaging/MERIT/SRRT/merge") dat <- read.table("test2.txt", header = TRUE, na.strings