Тёмный

Get & Set Working Directory in R (3 Examples) | getwd & setwd Functions | Change File Path of Folder 

Statistics Globe
Подписаться 30 тыс.
Просмотров 13 тыс.
50% 1

How to identify and change working directories using the getwd and setwd functions in the R programming language. More details: statisticsglob...
R code of this video:
getwd() # Apply getwd function
setwd("C:/Users/Joach/Desktop/my_folder") # Apply setwd function
getwd() # Checking new working directory
write.csv2(1:5, "some_data_1.csv") # Write csv file to path
my_path <- "C:/Users/Joach/Desktop/my_folder" # Save path
write.csv2(1:5, # Write csv file to path
paste0(my_path, "/some_data_2.csv"))
Follow me on Social Media:
Facebook - Statistics Globe Page: / statisticsglobecom
Facebook - Group for Discussions & Questions: / statisticsglobe
LinkedIn - Statistics Globe Page: / statisticsglobe
LinkedIn - Group for Discussions & Questions: / 12555223
Twitter: / joachimschork
Music by bensound.com

Опубликовано:

 

13 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 21   
@Sharon20001004
@Sharon20001004 16 дней назад
Vielen Dank für Ihre Erklärung!😃
@micha.statisticsglobe
@micha.statisticsglobe 14 дней назад
Sehr gerne! 🙂
@alaminafendy6071
@alaminafendy6071 11 месяцев назад
WHAT A GREAT EXPLANATION! THANKS.
@matthias.statisticsglobe
@matthias.statisticsglobe 11 месяцев назад
That's great to hear! Thank you very much for the feedback.
@TaraGhimite
@TaraGhimite 6 месяцев назад
Your video is very helpful thank you so much
@StatisticsGlobe
@StatisticsGlobe 6 месяцев назад
Thank you so much for the kind comment! Glad it was helpful!
@ruairimccay4120
@ruairimccay4120 3 месяца назад
I have a code which has several file paths or directories being read in and I want to change the same, one subfolder in each path. Instead of manually changing them one by one, I’ve assigned it as a value, say x
@StatisticsGlobe
@StatisticsGlobe 3 месяца назад
Hey, could you please share your code and the error message that is returned?
@ruairimccay4120
@ruairimccay4120 3 месяца назад
@@StatisticsGlobe thanks for your reply! code is this: Quarter
@StatisticsGlobe
@StatisticsGlobe 3 месяца назад
I believe the problem is due to the way how you use quotation marks. Does this work for you? Test
@beachlife8367
@beachlife8367 Год назад
I've tried to change the working directory in RStudio from "/cloud/project" to a directory (file ) I first set up on an external hard drive, and then (when that wouldn't work) on my desktop. Neither will work. Any suggestions?
@cansustatisticsglobe
@cansustatisticsglobe Год назад
Hello, If you have trouble with setting a working directory you can also do it manually via the menu bar in Rstudio. Click on "Session" then "Set Working Directory" then you can pick "To Source File Section" or click on "Choose Directory" to set the location of preference. Regards, Cansu
@xxxx8901
@xxxx8901 Год назад
What is the "1:5" that you put in the write.csv2 function?
@cansustatisticsglobe
@cansustatisticsglobe Год назад
Hello, Sorry for the late response. It is our sample data. It could also be defined explicitly as follows: data
@infotainment7246
@infotainment7246 2 года назад
Amazing👍
@StatisticsGlobe
@StatisticsGlobe 2 года назад
Thanks a lot, glad you like it! :)
@SaltyNicky
@SaltyNicky 11 месяцев назад
doesnt work
@cansustatisticsglobe
@cansustatisticsglobe 11 месяцев назад
Hello, Could you please share the code and the error you received? Best, Cansu
@SaltyNicky
@SaltyNicky 11 месяцев назад
sure can't, but I did figure out what I was doing wrong. I was trying to set the file location on my computer while using R online. I just switch to R studio on my desktop and I was able to find the file location.@@cansustatisticsglobe
@cansustatisticsglobe
@cansustatisticsglobe 10 месяцев назад
Hello, For some reason, RU-vid blocked your previous comment. I have just realized it. Although I have approved it now, I still can't see it here. But as far as I read, you fixed the problem already. Is it correct? Best, Cansu
@Alejandro_Gonzalez009
@Alejandro_Gonzalez009 10 месяцев назад
@@cansustatisticsglobe Hello I seem to be having the same issue as beachlife. I am using posit cloud and the directory doesn't change for me. It is currently stuck on /cloud.project. @beachlife8367 are you taking the Coursera course?
Далее
Will A Basketball Boat Hold My Weight?
00:30
Просмотров 30 млн
Cool Parenting Gadget Against Mosquitos! 🦟👶
00:21
How to Change Working Directory in R and RStudio
3:52
Writing Your Own Functions in R: Introduction
12:45
Просмотров 46 тыс.
Lubridate - how to manipulate date and time data in R
18:05
Setting a Working Directory in R
10:58
Просмотров 11 тыс.
A tutorial for writing functions in R (CC177)
14:37
Просмотров 15 тыс.
Will A Basketball Boat Hold My Weight?
00:30
Просмотров 30 млн