SEARCH
You are in browse mode. You must login to use MEMORY

   Log in to start


From course:

IST 387 Fall 2020

» Start this Course
(Practice similar questions for free)
Question:

How do you get the name of the current working directory in R?

Author: Zhasmina Yanislavova Tacheva



Answer:

The working directory is the folder on your computer R checks for a file whenever you want to import data into R. For example, you can set your Downloads folder as your working directory, and then you'll only need to supply the name of the file you want to import instead of the full path to that file: df <- read_csv("myFile.csv") instead of: df <- read_csv("C:\\User\\Downloads\\myFile.csv") To see what your current working directory is, type: getwd() And to change it: setwd("path\\to\\new\\working\\directory")


0 / 5  (0 ratings)

1 answer(s) in total