Jeff,

users will get the files they need to fill in on Teams, and will save them 
wherever they like. They will need to use R for image creation, but they are 
not trained for computing so they know where their stuff is, but I do not mean 
to expect they can use setwd() to set the working directory, or start with 
concepts such as working directory. Now they have the option of clicking their 
way to their files, they have been told their outputs will be next to those, 
and that is it.

I have work to do, I do not run a circus. My users have now the ability to run 
the scripts I wrote for them, get the images they need without the need for 
direct support, and we can go forth and get the stuff we get paid to do done. 
Sorry if using R as a tool for work offends.

F


--

Federico Calboli

Erityisasiantuntija, tutkimusrahoitus

Palveluryhmät

Luonnonvarakeskus

Files come from somewhere. Where do the files you are referring to come from? 
Where will it go after you are done with it?

Most of the time files that inexperienced users deal with come from downloads 
using a web browser, and most of the time they are directed into a Downloads 
folder. Whether you use that or the desktop, if the files build up over time 
then that group of similar files will get larger without bound. Will you 
support deleting the files once you are done with them?

R can read files from a URL directly almost as easily as it can from a 
directory. Can you make R aware of that location?

If you have another program generating the file, can you have it put it into an 
agreeable place? If so, a temporary directory or filename may be sufficient, 
since the OS will clean that out occasionally (though cleaning up after 
yourself is a better solution.


On December 8, 2025 6:24:29 AM PST, "Calboli Federico (LUKE)" 
<[email protected]> wrote:

As much I might agree with you in theory, people here are just using R to 
produce some graphs using one line of code I generated, so they can do the job 
they are paid to do (which is not computing). Producing said graph and its 
permutations would be more complex in any other way, and I want to make sure 
the instructions I printed out for them are as simple, accessible, and require 
the least amount of supervision.

F


--

Federico Calboli

Erityisasiantuntija, tutkimusrahoitus

Palveluryhmät

Luonnonvarakeskus

People who use computers should understand file names. It does not matter if 
you call them folders or directories they are the same animal.
I have a file called "my_file"
Where does it live? "On my computer" is like saying my mailing address is 
"Earth."

All files have a memory location in your computer where the computer can find 
the file contents. All names consist of two, but more commonly three parts: 
location, name, type. These answer "where is the file," "what is it called," 
and "what kind of file?" The format for location is disk drive followed by an 
ordered list of (directories or folders) from outer to innermost. I am on 
Windows, so for me this looks like c://dir1/dir2/dir3/. In words, I look on my 
hard drive named "C" and will find a directory called dir1. Inside dir1 will be 
dir2 and inside that will be dir3 where I can find my file.

File names typically end with a period followed by the type of file. .xlsx for 
an Excel file, .txt for a text file, .csv for comma separated values file, docx 
for a Microsoft word file. Most of the time on Windows the extension is hidden, 
and the path is shown at the top of the window. This was all very obvious in 
the old days working with DOS, but windows made things "easy" and took this 
away from the default output. In any case, files are all saved something like 
this: "c://dir1/dir2/dir3/my_file.docx".

I have multiple projects in R. I could change the working directory in R 
multiple times each day and try to keep up. I am bad at that. My solution is 
that I never change the working directory, so all read and write statements 
include the full file name, path and all. I can then switch between projects 
and not worry about where to read or save things and I do not sometimes get 
files saved in strange places. One could set the working directory at the start 
of each program, but that assumes that I want to always start working at the 
top of each program. I have not had much luck with that approach.

I sometimes write software for others to use. In this case I give users a popup 
window where they select their file using a graphical interface and then the 
program extracts the path from where the user got the file. This path is then 
added to the file name the user provides to save output. In this way I do not 
have to worry about the difference between "c://dir1/dir2/dir3/my_file.docx" 
and "c:\\dir1\dir2\dir3\my_file.docx"

Regards,
Tim

-----Original Message-----
From: R-help <[email protected]> On Behalf Of Calboli Federico (LUKE)
Sent: Monday, December 8, 2025 6:22 AM
To: [email protected]
Subject: [R] Windows standard interface: change working dorectory

[External Email]

Hello,

I need to provide the simplest possible indication to R users with either 
windows or macos machines on how to change working directory. Using setwd() 
will not work because I cannot trust them to even understand the concept of 
working directory.

On macos it is possible to have a GUI menu (the standard R GUI) that would 
allow the users to "click their way to where their data files are", is there 
such facility for the windows R GUI (the out-of-the-box one)? I have no access 
to windows machines, so I cannot check, but I am sure some people will use a 
windows laptop.

F


--

Federico Calboli

Erityisasiantuntija, tutkimusrahoitus

Palveluryhm�t

Luonnonvarakeskus

        [[alternative HTML version deleted]]


        [[alternative HTML version deleted]]
________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide 
https://www.R-project.org/posting-guide.html<https://www.r-project.org/posting-guide.html>
and provide commented, minimal, self-contained, reproducible code.

--
Sent from my phone. Please excuse my brevity.

        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to