What folder does R look at when trying to import a file? I'm using the read.csv command.
-
-
Answer:
R looks at the current working directory for importing a file, if full path of the file is not given. getwd() gives the current working directory and working directory can be changed using setwd().
Answer Wiki at Quora Visit the source
Other answers
You can use getwd() to see where R is looking, and setwd() to change it. Or you can use the full path of the filename.
Michael Hochster
You can use full address. (e.g., "C:/. . .")
David Jorjani
If you are on Windows, you can also use: file.choose() where the filename goes and a window pops up in which you can make a choice.
Patrick Burns
To add it further you can use this to write and read files, much elegant way of handling files http://stackoverflow.com/questions/4216753/check-existence-of-directory-and-create-if-doesnt-exist
Utkarsh Naiknaware
I have very interesting question about file import into R. I have a file mydata.cvs This file is updating by the software every 2 seconds and data is added. How do you work out this problem ? I mean how to refresh data in R ? Do you use some file read/write ? I just wondering why doesn't exist stream data package in such useful language ? I know that R doesnt support streams by itself, but would be nice to have one. Nowadays the data changes very quickly and it will be very usefull
Rimantas Venckus
Related Q & A:
- How to Login to Stackoverflow in Chrome with a different Google ID than the one I'm using for Chrome?Best solution by Meta Stack Overflow
- What should I look for when buying a DVD recorder?Best solution by Yahoo! Answers
- What are some things I should look for when buying a snowboard (URGENT?Best solution by Quora
- What should I look for when buying a used jet ski?Best solution by ebay.com
- What mistakes do they look for when taking an Oklahoma driving test?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.