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
Windows standard interface: change working dorectory
14 messages · Calboli Federico (LUKE), Erin Hodgess, Michael Dewey +4 more
Dear Federico If they click on File in the top left hand corner and then Change dir in the drop-down menu if opens a file explorer type window where they can click on directories (folders in MS-speak) in the usual way. That does not get round the problem that they need to know where they put the file in the first place of course but it might help some of them. Michael
On 08/12/2025 11:22, Calboli Federico (LUKE) wrote:
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]]
______________________________________________ R-help at r-project.org 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.
Michael Dewey
Thanks! That sorts it! I?ll tell people to put files on their desktops, and that should suffice. F -- Federico Calboli Erityisasiantuntija, tutkimusrahoitus Palveluryhm?t Luonnonvarakeskus Dear Federico If they click on File in the top left hand corner and then Change dir in the drop-down menu if opens a file explorer type window where they can click on directories (folders in MS-speak) in the usual way. That does not get round the problem that they need to know where they put the file in the first place of course but it might help some of them. Michael
On 08/12/2025 11:22, Calboli Federico (LUKE) wrote:
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]]
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help<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.
-- Michael Dewey
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 <r-help-bounces at r-project.org> On Behalf Of Calboli Federico (LUKE) Sent: Monday, December 8, 2025 6:22 AM To: r-help at r-project.org 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
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 <r-help-bounces at r-project.org> On Behalf Of Calboli Federico (LUKE) Sent: Monday, December 8, 2025 6:22 AM To: r-help at r-project.org 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
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)" <federico.calboli at luke.fi> 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 <r-help-bounces at r-project.org> On Behalf Of Calboli Federico (LUKE)
Sent: Monday, December 8, 2025 6:22 AM
To: r-help at r-project.org
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]]
______________________________________________ R-help at r-project.org 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.
-- Sent from my phone. Please excuse my brevity.
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)" <federico.calboli at luke.fi> 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 <r-help-bounces at r-project.org> On Behalf Of Calboli Federico (LUKE) Sent: Monday, December 8, 2025 6:22 AM To: r-help at r-project.org 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 ________________________________ R-help at r-project.org 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.
Hello! What about file.choose? Would that help? Erin Hodgess, PhD mailto: erinm.hodgess at gmail.com On Mon, Dec 8, 2025 at 10:28?AM Calboli Federico (LUKE) <
federico.calboli at luke.fi> wrote:
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)" <
federico.calboli at luke.fi> 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 <r-help-bounces at r-project.org> On Behalf Of Calboli Federico
(LUKE)
Sent: Monday, December 8, 2025 6:22 AM
To: r-help at r-project.org
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]]
________________________________ R-help at r-project.org 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]] ______________________________________________ R-help at r-project.org 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.
If they are going to run a script which you have prepared for them then they can click on File and then click on Source R code which opens the same Explorer type window but only shows runnable files. From the responses you are getting I think most people on this list do not come into contact with people who are so ignorant of computing basics. They are fortunate. Michael
On 08/12/2025 17:27, Calboli Federico (LUKE) wrote:
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)" <federico.calboli at luke.fi> 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 <r-help-bounces at r-project.org> On Behalf Of Calboli Federico (LUKE)
Sent: Monday, December 8, 2025 6:22 AM
To: r-help at r-project.org
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]]
________________________________ R-help at r-project.org 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]] ______________________________________________ R-help at r-project.org 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.
Michael Dewey
This sounds more like there are some hourly employees that you do not want to train but they need to produce a graph for you. In this case I would use a package in R called Shiny to create an app. The worker opens the app, types in the file name and the app sends you the graph. The employee will never see the R code. This level of use in Shiny is about as basic as it gets. It costs you time to learn Shiny basics, but it will save you time in not having to train employees. If written properly, the employee only needs to know how to find their data file (which probably should be saved in your company TEAMS folder, and not some personal computer). An R user writes code (good or bad but writes code) and therefore does computing. It sounds like your employees would not qualify as R users and you want to keep it this way. Lock the R code in a Shine app and you do not have to worry about any of this. See: https://shiny.posit.co/ Tim From: Calboli Federico (LUKE) <federico.calboli at luke.fi> Sent: Monday, December 8, 2025 9:24 AM To: Ebert,Timothy Aaron <tebert at ufl.edu>; r-help at r-project.org Subject: Re: Windows standard interface: change working dorectory [External Email] 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 <r-help-bounces at r-project.org<mailto:r-help-bounces at r-project.org>> On Behalf Of Calboli Federico (LUKE) Sent: Monday, December 8, 2025 6:22 AM To: r-help at r-project.org<mailto:r-help at r-project.org> 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
3 days later
One of the things that has really simplified things for my students is using RStudio to run R, and then always creating (working within) an RProject. The location of the RProject becomes the default location (home folder) for all related files in the project.? It dispenses with having to teach the students too much about absolute and relative paths, and it is very flexible in the sense that you can move a folder from one drive to another or from one computer to another, and things still work as long as you start R (RStudio) with the same project selected. I had no end of agony with "path confusion" before using this approach. Rob
On 12/8/2025 5:22 AM, Calboli Federico (LUKE) wrote:
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]]
______________________________________________ R-help at r-project.org 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.
--- Robert W. Baer, Ph.D. Professor of Physiology Kirksville College of Osteopathic Medicine A.T. Still Univerisity of Health Sciences 800 W. Jefferson St. Kirksville, MO 63501
I reply as a passive observer and not one with insight or advice. So certainly no need to respond. I am just amazed that in this day and age students of any sort in higher education institutions of any sort have difficulty understanding the basics of (the tree structure of) file organization on any sort of computer. I suspect that this reflects my profound ignorance of how most of today's young people have interacted with the manifold computational resources that they use every day through brilliantly crafted UI's. Still, I would have assumed that such knowledge would be basic to any "higher education" these days. Silly me... Cheers, Bert On Thu, Dec 11, 2025 at 4:54?PM Robert Baer via R-help <r-help at r-project.org> wrote:
One of the things that has really simplified things for my students is using RStudio to run R, and then always creating (working within) an RProject. The location of the RProject becomes the default location (home folder) for all related files in the project. It dispenses with having to teach the students too much about absolute and relative paths, and it is very flexible in the sense that you can move a folder from one drive to another or from one computer to another, and things still work as long as you start R (RStudio) with the same project selected. I had no end of agony with "path confusion" before using this approach. Rob On 12/8/2025 5:22 AM, Calboli Federico (LUKE) wrote:
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]]
______________________________________________ R-help at r-project.org 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. -- --- Robert W. Baer, Ph.D. Professor of Physiology Kirksville College of Osteopathic Medicine A.T. Still Univerisity of Health Sciences 800 W. Jefferson St. Kirksville, MO 63501 ______________________________________________ R-help at r-project.org 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.
My wife was a returning college student 10 years ago, and her stories to me of her upper division engineering students coping with files and Excel corroborate this deficiency. She was rather more computer-literate than average, but was still apprehensive about piling R on top of her engineering workload at that time. She later did a Master's and finally started using R and has expressed regret that she did not start using it sooner... but I meet engineers all the time who can barely use Excel much less a scripting language. I suspect that ubiquitous GUI programs create a conceptual gap with text-based programming and hierarchical thinking. People are able to skim by all their lives without ever having to organize information.. just type in questions to Google... so why should they start now?
On December 11, 2025 6:37:59 PM PST, Bert Gunter <bgunter.4567 at gmail.com> wrote:
I reply as a passive observer and not one with insight or advice. So certainly no need to respond. I am just amazed that in this day and age students of any sort in higher education institutions of any sort have difficulty understanding the basics of (the tree structure of) file organization on any sort of computer. I suspect that this reflects my profound ignorance of how most of today's young people have interacted with the manifold computational resources that they use every day through brilliantly crafted UI's. Still, I would have assumed that such knowledge would be basic to any "higher education" these days. Silly me... Cheers, Bert On Thu, Dec 11, 2025 at 4:54?PM Robert Baer via R-help <r-help at r-project.org> wrote:
One of the things that has really simplified things for my students is using RStudio to run R, and then always creating (working within) an RProject. The location of the RProject becomes the default location (home folder) for all related files in the project. It dispenses with having to teach the students too much about absolute and relative paths, and it is very flexible in the sense that you can move a folder from one drive to another or from one computer to another, and things still work as long as you start R (RStudio) with the same project selected. I had no end of agony with "path confusion" before using this approach. Rob On 12/8/2025 5:22 AM, Calboli Federico (LUKE) wrote:
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]]
______________________________________________ R-help at r-project.org 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. -- --- Robert W. Baer, Ph.D. Professor of Physiology Kirksville College of Osteopathic Medicine A.T. Still Univerisity of Health Sciences 800 W. Jefferson St. Kirksville, MO 63501 ______________________________________________ R-help at r-project.org 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.
[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org 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.
-- Sent from my phone. Please excuse my brevity.
I gave up when I started encountering people who thought computer literacy was how to use Word and Excel. -----Original Message----- From: R-help <r-help-bounces at r-project.org> On Behalf Of Jeff Newmiller via R-help Sent: Thursday, December 11, 2025 10:17 PM To: Bert Gunter <bgunter.4567 at gmail.com> Cc: r-help at r-project.org; Calboli Federico (LUKE) <federico.calboli at luke.fi> Subject: Re: [R] [Offlist] Windows standard interface: change working dorectory [External Email] My wife was a returning college student 10 years ago, and her stories to me of her upper division engineering students coping with files and Excel corroborate this deficiency. She was rather more computer-literate than average, but was still apprehensive about piling R on top of her engineering workload at that time. She later did a Master's and finally started using R and has expressed regret that she did not start using it sooner... but I meet engineers all the time who can barely use Excel much less a scripting language. I suspect that ubiquitous GUI programs create a conceptual gap with text-based programming and hierarchical thinking. People are able to skim by all their lives without ever having to organize information.. just type in questions to Google... so why should they start now?
On December 11, 2025 6:37:59 PM PST, Bert Gunter <bgunter.4567 at gmail.com> wrote:
I reply as a passive observer and not one with insight or advice. So certainly no need to respond. I am just amazed that in this day and age students of any sort in higher education institutions of any sort have difficulty understanding the basics of (the tree structure of) file organization on any sort of computer. I suspect that this reflects my profound ignorance of how most of today's young people have interacted with the manifold computational resources that they use every day through brilliantly crafted UI's. Still, I would have assumed that such knowledge would be basic to any "higher education" these days. Silly me... Cheers, Bert On Thu, Dec 11, 2025 at 4:54?PM Robert Baer via R-help <r-help at r-project.org> wrote:
One of the things that has really simplified things for my students is using RStudio to run R, and then always creating (working within) an RProject. The location of the RProject becomes the default location (home folder) for all related files in the project. It dispenses with having to teach the students too much about absolute and relative paths, and it is very flexible in the sense that you can move a folder from one drive to another or from one computer to another, and things still work as long as you start R (RStudio) with the same project selected. I had no end of agony with "path confusion" before using this approach. Rob On 12/8/2025 5:22 AM, Calboli Federico (LUKE) wrote:
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]]
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://s/ tat.ethz.ch%2Fmailman%2Flistinfo%2Fr-help&data=05%7C02%7Ctebert%40u fl.edu%7C9333d27b96684d59385308de392cff35%7C0d4da0f84a314d76ace60a6 2331e1b84%7C0%7C0%7C639011062598522223%7CUnknown%7CTWFpbGZsb3d8eyJF bXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWF pbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=XEwkGlEWJIknFVWCq1D1oCozKv ut3c%2FJJWKC%2BHL9fio%3D&reserved=0 PLEASE do read the posting guide
https://www/ .r-project.org%2Fposting-guide.html&data=05%7C02%7Ctebert%40ufl.edu%7 C9333d27b96684d59385308de392cff35%7C0d4da0f84a314d76ace60a62331e1b84% 7C0%7C0%7C639011062598568589%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGki OnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyf Q%3D%3D%7C0%7C%7C%7C&sdata=WifGgYk%2B7bcwR8r%2FAuRark0xWThNayI0vj3WFV k6COk%3D&reserved=0
and provide commented, minimal, self-contained, reproducible code.
-- --- Robert W. Baer, Ph.D. Professor of Physiology Kirksville College of Osteopathic Medicine A.T. Still Univerisity of Health Sciences 800 W. Jefferson St. Kirksville, MO 63501
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://sta/ t.ethz.ch%2Fmailman%2Flistinfo%2Fr-help&data=05%7C02%7Ctebert%40ufl.e du%7C9333d27b96684d59385308de392cff35%7C0d4da0f84a314d76ace60a62331e1 b84%7C0%7C0%7C639011062598595046%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1h cGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUI joyfQ%3D%3D%7C0%7C%7C%7C&sdata=kqKyl6Igc6uG2B7c%2FwrGQl%2FUnFE2MXsW5i SR3Xymng8%3D&reserved=0 PLEASE do read the posting guide https://www/ .r-project.org%2Fposting-guide.html&data=05%7C02%7Ctebert%40ufl.edu%7 C9333d27b96684d59385308de392cff35%7C0d4da0f84a314d76ace60a62331e1b84% 7C0%7C0%7C639011062598620415%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGki OnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyf Q%3D%3D%7C0%7C%7C%7C&sdata=4KaTZA5tt1AHn35kMYXg3vsiMf4McVsXKSZswI6697 k%3D&reserved=0 and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat/. ethz.ch%2Fmailman%2Flistinfo%2Fr-help&data=05%7C02%7Ctebert%40ufl.edu%7 C9333d27b96684d59385308de392cff35%7C0d4da0f84a314d76ace60a62331e1b84%7C 0%7C0%7C639011062598650695%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRy dWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3 D%7C0%7C%7C%7C&sdata=%2FeJyDip2xE3Ohyb7YM1h4zZbVEXEq%2BRnYQ3w7NsPJaA%3D &reserved=0 PLEASE do read the posting guide https://www.r/ -project.org%2Fposting-guide.html&data=05%7C02%7Ctebert%40ufl.edu%7C933 3d27b96684d59385308de392cff35%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C 0%7C639011062598676440%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUs IlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C 0%7C%7C%7C&sdata=%2FprLxyOhs1A0BRLx0w8CzcIzrlF0CbR59w%2FhUAQpuDQ%3D&res erved=0 and provide commented, minimal, self-contained, reproducible code.
-- Sent from my phone. Please excuse my brevity. ______________________________________________ R-help at r-project.org 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.