r set working directory

r set working directory

Hi,

How to set working directory in r?

Thanks

View Answers

December 25, 2017 at 1:38 AM

Hi,

For R programming you can use R GUI or RStudio. There are command to set the working directory in R.

Working directory is the base directory for your current work which contains data and other files related to your project.

After setting working directory you can load data files without providing full path.

Here is command to set working directory in R:

setwd("C:/R/examples")

For this you can use the setwd() command.

For finding current directory following command is used:

 getwd()

Thanks


December 25, 2017 at 1:39 AM

Hi,

Check more tutorials at R Programming tutorials.

Thanks


December 25, 2017 at 1:50 AM

Hi,

In windows you can also use the \\ in the command to provide path:

setwd("C:\\R\\examples")

Thanks

Ads









Related Tutorials/Questions & Answers:
r set working directory
r set working directory  Hi, How to set working directory in r.... There are command to set the working directory in R. Working directory is the base... full path. Here is command to set working directory in R: setwd("C:/R
Getting the Current Working Directory in Java
C:\nisha>javac GetCurrentDir.java C:\nisha>java GetCurrentDir Current Working Directory : C:\nisha C:\nisha> Download this example
Advertisements
Get current working directory in Java
Get current working directory in Java In this section we will discuss about how to get the the current working directory in java. Current working directory means the current working directory where java program execute. In java
FTP Server : Change working directory
In this tutorial you will learn how to change working directory on FTP server using java
Java Example program to get the current working directory
Java Example program to get the current working directory... program illustrates to get the current working directory (CWD). With the File class...;Current directory's canonical path: "    + 
R command not found Windows
Program. If your R Programming language is not set correctly then you won't... directory of r programming language into the system path variable. Open... and then provide the path of bin directory of your R software installation. Then click
UITapgesturerecognizer not working
UITapgesturerecognizer not working  uitapgesturerecognizer not working
R Programming for Data Science
Science As mentioned earlier R Programming language comes with rich set of pre... is used for working with dates and times in R Program. ggplot2: This package...R Programming language offers various tools for Data Science R Programming
r ggplot2 install
r ggplot2 install  Hi, I am working Big Data project to analyze data and want to plot using ggplot2. How to install r ggplot2 package? Thanks.... The ggplot2 is not comes with the default r installation and you have to download
r ggplot2 install
r ggplot2 install  Hi, I am working Big Data project to analyze data and want to plot using ggplot2. How to install r ggplot2 package? Thanks.... The ggplot2 is not comes with the default r installation and you have to download
r ggplot2 install
r ggplot2 install  Hi, I am working Big Data project to analyze data and want to plot using ggplot2. How to install r ggplot2 package? Thanks.... The ggplot2 is not comes with the default r installation and you have to download
r programming
r programming  Hi, How r programming is playing a big role in the Big Data time? These days companies are employing programmers with R Programming experience. Salary of R Programmer is also very high and its a demanding job
How long does it take to learn R Programming?
a particular job. So, for learning R programming we just need to set a milestone... programs in R programming. You can also start working on the real projects...Learning R Programming - How long does it take to learn R Programming? R
creating a file in a directory
creating a file in a directory  hi i have tried all the file methods to create a file inside a directory but none of them r working some of them are new File ( ".", "C:/fileInRoot.txt" ) new File ( "myDir", "/otherDir" ) File
UIWebView zoom not working
UIWebView zoom not working  Hi, I don't know why UIWebView zoom not working? Tell the solution. Thanks   Hi, Open the .xib file and set scalesPageToFit to YES. Thanks
Are there any online courses for learning R?
Are there any online courses for learning R?  Hi, R is getting very... are coming for R Experts. So, I will learn it in hurry. Is there any good online training course for Learning and mastering R? Instructor should be able
Datagrid not working
Datagrid not working  The code here is working fine, apart from the fact that that I'm using netbeans 6.5 and the servlet v2.5 and struts 1.1.... working. please help me out
hibernate.archive.autodetection not working
hibernate.archive.autodetection not working  Hi, What is the use of hibernate.archive.autodetection? I am trying to use in my project but its not working. How to resolve hibernate.archive.autodetection not working issue
r for data
r for data  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: r for data Try to provide me good examples or tutorials links so that I can learn the topic "r
Overview of R Programming
and graphs.   R Programming language provides large set of packages.  ... with huge set of functionality. R programming language is getting very popular...Overview of the R Programming language for data science R Programming language
r
StandardServiceRegistryBuilder not working in Hibernate 4.3.1
StandardServiceRegistryBuilder not working in Hibernate 4.3.1  Hi, It seems that the StandardServiceRegistryBuilder not working in Hibernate 4.3.1.... working with the Hibernate 4.3.1 and it is giving following error message: Access
Why this is not working...?
Why this is not working...?  import java.util.*; public class Family { int size_of_family=0; public Person[] members=new Person[size_of_family]; Person d = new Person(); public Family (int size_of_family){ members = new
R Programming training in Delhi
R Programming training in Delhi by experts R Programming language offers API... basic and advanced R Programming training in Delhi at our development center in Delhi. R Programming training course is also delivered online so that you
php <? ?> tag not working
php tag not working  why PHP tags not working in my application?   This might happen when your shortopentag is turned off. So, you... is the steps: set directive shortopentag = On in your php.ini. call iniset
Update not working in hibernate.
Update not working in hibernate.  Update not working in hibernate
Comparing arrays not working correctly?
Comparing arrays not working correctly?  Comparing arrays not working correctly
What is the best online course to learn R?
What is the best online course to learn R?  Hi, I am engineer with experience on the statistics. I also learned little Java. I want to learn R... data scientists. What is the best online course to learn R? Thanks  
E-R diagram
E-R diagram  Hi,Hw to do draw E-R diagram for online movie ticket booking
E-R diagram
E-R diagram  Hi,Hw to do draw E-R diagram for online movie ticket booking
How to close R Console?
How to close R Console?  Hi, I am inside R console. How to close R Console? Thanks   Hi, R Console is used to run the R Program. You can write and test R Programs here. If you wish to close the session then type: q

Ads