Displaying 20 results from an estimated 10000 matches similar to: "Strange behaviour of setwd/getwd"
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
2017 Aug 05
3
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
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
2004 Mar 20
1
setwd() permenent
Hello
when I close and reopen R it gives back a different wd
than what I used in setwd. how can I get it to
permenently use dirname in setwd("dirname") and not
the other name it keeps defaulting to?
I am using W2K and ESS
thanks
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
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 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
2019 Jun 14
2
Ejecutar un script de Python con argumentos desde R
Ni idea de eso; te lo agradezco. Seguramente lo voy a terminar usando
bastante.
Pregunto: ahí debería hacer todas las operaciones propias del sistema? No
me encuentra el script, y se me hace raro. Capaz que pasa al sistema desde
la carpeta en la que está el script de R, no desde el wd de R.
Ahora me toca salir y después intentar probar y que funcione.
Gracis de vuelta
Hau idatzi du Marcelino De
2013 Jan 11
1
Patch for setwd() to show path in error message
Below is a patch for setwd() to show path in error message. Current
it just gives error messages such as:
Error in setwd(libdir) : cannot change working directory
with the patch it should (read untested) give:
Error in setwd(libdir) : cannot change working directory to 'path/that/fails/'
PATCH:
% diff -u util.c "util,patch.c"
--- util.c 2012-12-16 13:13:05.002249900
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
2000 Mar 07
0
getwd/setwd function
Hello All,
It appears that something is still not right with my linux systems. I can
compile R (ie make and make install) but make check fails. It appears
that the getwd and setwd functions don't work -- getwd returns gibberish.
Thus I can run the graphics demo until it tries to read in the iris data.
I'll admit I've done maybe too much to these systems to be able to get R
to
2017 Jun 17
3
write.dna command
Hi all,
I am learning R by "doing". And this is my first post.
I want to use R: 1- to fetch a DNA sequence from a databank (see bellow)
and 2- store it as FASTA file.
The problem: neither an error is prompted nor the fasta file is created.
Testing the code (see bellow), I notice that everything works until
the *"write.dna"
*command - which is not creating the fasta file.
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
2013 Sep 04
4
Comments requested on "changedFiles" function
In a number of places internal to R, we need to know which files have
changed (e.g. after building a vignette). I've just written a general
purpose function "changedFiles" that I'll probably commit to R-devel.
Comments on the design (or bug reports) would be appreciated.
The source for the function and the Rd page for it are inline below.
----- changedFiles.R:
changedFiles
2006 Nov 10
2
Command Line Prompt Symbol
Hi
I run R in Windows.
Is there a simple way of changing the prompt symbol ">" to, say, "R>" ?
(Not just for a temporary session, but every time R command window is
opened.) The documentation of doing this is rather "sparse".
Much appreciated for your assistance.
Jacob
Jacob L van Wyk
Department of Statistics
University of Johannesburg, APK
P O Box 524
2019 Jun 14
2
Ejecutar un script de Python con argumentos desde R
Hola, amigos
Se me acabo la sapienza. A ver:
tengo un sript de Python script.py que neesita sus argumentos arg1 arg2
arg3, si desde la consola del sistema me pongo en la carpeta en la que lo
tengo y hago:
$ script.py arg1 arg arg3
Funciona perfecto.
Pero desde R no lo consigo (entiendo que por no saber)
Lo hago así (copio y pego):
dir <- getwd()
setwd('data/row/directoriocondatos/')
2017 Jun 17
0
write.dna command
I suspect you meant
WD <- "~/Documents/Scripting/R_Studio/Sequences/"
but I am entirely unfamiliar with the packages you are using, and know nothing about what is on your hard drive.
For future reference:
A) Read the Posting Guide. This is a plain text email list, and your html formatting gets removed leaving a mess that is not always readable.
B) Most frequent users of R
2024 Dec 18
2
Query concerning working directory for file.choose()
I believe file.choose() remembers the last choice, and repeats that
location the next time you call it. This is true when it is called at
top level or from within a function.
The first time you call it in a session, it will default to the current
working directory, but not after that.
Front ends are allowed to replace the underlying function, so that may
depend on which front end you are
2018 May 20
3
Loop Function to Create Multiple Scatterplots
Hello,
I am trying to create multiple scatter plot graphs. I have 1 independent
variable (Age - weeks post conception) and 18 dependent variables ("Gene n"
Expression) in one csv file. Is there a way to set up a looped function to
produce 18 individual scatterplots? At the moment, I am writing the plot()
function out 18 times to make the 18 graphs. My code is below and csv file
is
2013 Jun 12
2
Functions within functions - environments
Dear list,
I have a problem with nested functions and I don't manage to get it
solved. I know I should be looking in environments, and I have tried a
lot, but it keeps on erroring.
An easy version of the problem is as follows:
innerfunction<-function()
{
print(paste(a, " from inner function"))
print(paste(b, " from inner function"))
setwd(wd)
}