Setting Up Working Directory in R | R Tutorial 1.11 | MarinStatsLectures

  Рет қаралды 246,736

MarinStatsLectures-R Programming & Statistics

MarinStatsLectures-R Programming & Statistics

Күн бұрын

Пікірлер: 106
@marinstatlectures
@marinstatlectures 5 жыл бұрын
In this R tutorial, we will learn to set up working directories in R Using RStudio Menus and R Functions such as "getwd", "setwd", "save.image", and "load”. Make sure to practice with Free Dataset: (statslectures.com/r-scripts-datasets) 🤓If Like to support us you can Donate (bit.ly/2CWxnP2), Share our Videos, Leave us a Comment, Give us a Like 👍🏼 or write us a review! Either way We Thank You!
@mounikareddy2532
@mounikareddy2532 10 жыл бұрын
I was struggling as to get a good online source and after long search..found your videos which a starter like me can easily understand and jumpstart with R
@abisobowale86
@abisobowale86 9 жыл бұрын
Mr Marin! You are just the bomb! I am loving this like ice cream. God bless you for saving a career.
@marinstatlectures
@marinstatlectures 9 жыл бұрын
good to hear +Emmanuel Show !
@lakshmi8906
@lakshmi8906 4 жыл бұрын
Thanks a lot! I was so frustrated with the lack of proper instructions online when I found this video.
@mathrock889
@mathrock889 2 жыл бұрын
thanks for such a great sequence of steps to follow to command on R... i am so glad to find you after weeks, finally got a platform to better learn.
@javiermoralesds
@javiermoralesds 4 жыл бұрын
I needed a detail set up for this for one of my homework's in one of my courses as my Professor didn't go over how to do this. Appreciate you making this video!
@ravisharma-zb6ky
@ravisharma-zb6ky 10 жыл бұрын
the way concepts are presented in all these videos are really great..thanks Marin for all your help ...... !!
@marinstatlectures
@marinstatlectures 10 жыл бұрын
You're welcome ravi sharma , and thanks for your support!
@nazifataha8868
@nazifataha8868 4 жыл бұрын
This is a blessing in my life. So detailed and clear to understand. I found it very simple to understand as a beginner
@diyashah9528
@diyashah9528 4 жыл бұрын
Hi Dear ... could you help me?
@ankitasrivastava6035
@ankitasrivastava6035 9 жыл бұрын
Really helpful lessons.! All of them. Explained so easily that even when i didnt know a thing about R, I got everything. Great work +MartinStatsLecture. !!
@mathrock889
@mathrock889 2 жыл бұрын
same was the situation with them. thanks to you @Marinstatslecture...
@nishantthakar9099
@nishantthakar9099 10 жыл бұрын
Hey Martin! Thanks for creating all this Videos. Its Quite easy to understand for any newbie. Appreciate!
@vivek19992
@vivek19992 10 жыл бұрын
Best piece of work I have ever seen, in explaining a software! Very simple, yet highly effective. Thanks a ton!
@marinstatlectures
@marinstatlectures 10 жыл бұрын
Thanks vivek reddy , we appreciate you saying that!
@olivor_h
@olivor_h 8 жыл бұрын
Thanks for these videos, they're really easy to follow and understand.
@marinstatlectures
@marinstatlectures 8 жыл бұрын
you're welcome +Olivor Holman !
@pasupathyvasaha168
@pasupathyvasaha168 5 жыл бұрын
The video was really helpful Martin...Thank you!!
@marinstatlectures
@marinstatlectures 5 жыл бұрын
you're welcome
@akbarkarimi4582
@akbarkarimi4582 6 жыл бұрын
Thank you so much Mike for these great videos.
@emmasteigerwald2668
@emmasteigerwald2668 9 жыл бұрын
I was unable to get a seat in the basic R course in my grad program, and was so sad. Now I don't have to miss out!! Thank you for the methodical introduction!
@marinstatlectures
@marinstatlectures 9 жыл бұрын
you're welcome Emma Steigerwald , glad you're finding them helpful. i developed these videos to support R training within our grad program as well...
@4meSaints
@4meSaints 5 жыл бұрын
very very useful, saved me a lot of time with this!
@ProfArunkumarDubey
@ProfArunkumarDubey 6 жыл бұрын
Very nicely explained. Best wishes from India
@marinstatlectures
@marinstatlectures 6 жыл бұрын
Thanks :)
@zoyabelmesova1658
@zoyabelmesova1658 8 жыл бұрын
Very clear and helpful, thank you!
@marinstatlectures
@marinstatlectures 8 жыл бұрын
you're welcome +Zoya Belmesova !
@rayachercher
@rayachercher Жыл бұрын
THANKS FOR YOUR BRIEF EXPLANATION
@almitra09
@almitra09 3 ай бұрын
Thankyou it was very helpful
@ahmedserag7906
@ahmedserag7906 8 жыл бұрын
Thank you for your nice lectures. It really helped me a lot.
@marinstatlectures
@marinstatlectures 8 жыл бұрын
you're welcome +Ahmed Serag !
@madhu-ki-duniyaofficial
@madhu-ki-duniyaofficial 9 жыл бұрын
I love to learn from yr videos thanks for uploading such a great video.
@marinstatlectures
@marinstatlectures 9 жыл бұрын
thanks +madhu sankhwar ! we're glad to hear you're loving them ;)
@Ikarus2985
@Ikarus2985 8 жыл бұрын
Just recognized: On Windows there migth be an slash backslash issue. When you copy a pathname from Windows file explorer it gives you: C:\Users\Ika\etc.
@marinstatlectures
@marinstatlectures 8 жыл бұрын
thanks for that +Ikarus2985 , i don't use windows and am not very familiar with it, so it's good to have that here, to clear it up in case others run into this issue.
@Ikarus2985
@Ikarus2985 8 жыл бұрын
You are welcome!
@harmagician1
@harmagician1 10 жыл бұрын
Excellent productions.
@marinstatlectures
@marinstatlectures 10 жыл бұрын
Thanks ***** !
@jopsilon9232
@jopsilon9232 8 жыл бұрын
This is super helpful. Thank you for making these videos! It saves me sooo many hours!
@marinstatlectures
@marinstatlectures 8 жыл бұрын
you're welcome +Christian Kirifidis , glad we could help
@liutrvcyrsui
@liutrvcyrsui 3 жыл бұрын
quick and clear
@swarajghosh100
@swarajghosh100 10 жыл бұрын
Appreciate your work :)
@marinstatlectures
@marinstatlectures 10 жыл бұрын
thanks Swaraj Ghosh !
@mohammadmuneer6463
@mohammadmuneer6463 10 жыл бұрын
Awesome !!!
@nd.drones
@nd.drones 6 жыл бұрын
thank you
@ragulvr9744
@ragulvr9744 9 жыл бұрын
should we use only forward slash for specifying the working directory and not backward slash? i.e only "/" and not "\"??
@maziark3861
@maziark3861 8 жыл бұрын
Thanks for the great instructions. One suggestion... It might be better to have this video a bit earlier. Up to this video, I had difficulties in saving my working space and the progress I had sofar from previous videos.
@marinstatlectures
@marinstatlectures 8 жыл бұрын
thanks for the suggestion +Maziar Karimi . there's always a trade-off when deciding the order to present material in. the reason we chose this ordering was to first allow the beginner to get used to the software a bit, and not overwhelm them with too many details before getting their hands wet. but id agree, that we could just as easily have them ordered differently.
@geess5684
@geess5684 4 жыл бұрын
Hi Marin, seems very simple when you explain. But all that I got just the first line correct: setwd(pathway). Beyond that, not able to change the name for simplifications. R responds by saying "cannot change working directory". Where am I going wrong? Thank you in advance
@yuvenmuniandy8202
@yuvenmuniandy8202 8 жыл бұрын
Thanks for this video. I have questions: (a) Is it always necessary to set the working directory when starting a new session. (b) Can different files (Rmd, Rscript or Rdata) be stored under a same folder for one project? (c) Personally I choose to import my files from a directory rather the file.choose, as I always in the end like to knit the Rmd document to word or PDF. If i use file.choose to import, i always get error when knitting. I guess this is because in this way, a pop up window appears to import data. Maybe R couldn't recognise this when knitting. (d) could you please do some videos on absolute and relative path for wd. Would really appreciate if you can reply. Thank you.
@mmebella4297
@mmebella4297 7 жыл бұрын
Dear Mike, When I run the summary of z, for Smoke, Gender and Caesarean I get class and mode as "Character" and not the numbers visible in the video. Can you please help?
@bwww2011
@bwww2011 9 жыл бұрын
Hi Mike, thanks for the video; I was wondering if there is a way to save the contents thats already input in the console? The load function couldnot pull that one off. Thanks!
@marinstatlectures
@marinstatlectures 9 жыл бұрын
Hi +B Www , R wont be able to load what ever was entered previously into the console, only what it 'remembers' that you can see in the workspace. the way to save what is going into the console is to create a script of your code as you are working. i have a video explaining a bit more about this that you can check out if you want to learn more about scripts: kzbin.info/www/bejne/p6LdkHdnq9-Ga68
@bwww2011
@bwww2011 9 жыл бұрын
+
@bwww2011
@bwww2011 9 жыл бұрын
MarinStatsLectures Thanks Marin. Happy New Yea btw; have a great 2016. 
@marinstatlectures
@marinstatlectures 9 жыл бұрын
Happy New Year to you too B Www !
@chukwudikeofodum6839
@chukwudikeofodum6839 2 жыл бұрын
How do you change the working directory from cloud to local disc on Rstudio cloud online?
@daniele1717
@daniele1717 3 жыл бұрын
best boy!
@sumitkumarsain5542
@sumitkumarsain5542 6 жыл бұрын
Hi Marin.. Suppose I have created many large datasets in one session and then I choose to save this workspace as image. Now will this image file occupy space equivalent to spaces occupied by those large datasets in total!
@marinstatlectures
@marinstatlectures 6 жыл бұрын
sorry, i dont have an answer for this one, but id suggest to try posting the question on "Stack Overflow", and you'll likely get a good answer there
@sanjeebkumar8539
@sanjeebkumar8539 10 жыл бұрын
Hello Sir,Thanks again for this video.Yes I am learning a lot..I have to present a POC where I have to use R with PMML and then I have to use Data from Hadoop Eco system. Can you please help me out.
@marinstatlectures
@marinstatlectures 10 жыл бұрын
Hi sanjeeb kumar , thanks for your comment. I'm sorry, but I am not able to help with your work, as I am extremely busy with my own work at the moment.
@fisherman6246
@fisherman6246 6 жыл бұрын
1. Read multiple json files into a working directory for further converting into a dataset. I have files text1, text2, text3 in the directory json . I dont know how to do it. please teach me how
@nboruett
@nboruett 8 жыл бұрын
Great
@charitysmith1452
@charitysmith1452 9 жыл бұрын
Hi Mike, I am enjoying your videos on R, but i am having some trouble while I am working through this video. Every time I type in MeanAge
@marinstatlectures
@marinstatlectures 9 жыл бұрын
Hi +Charity Smith , thanks! it is because in the videos, i have "attached" the data (so that R can 'see' the variables in the dataset. if you enter the command *attach(LungCapData)*, R will be able to recognize the variables, and the command you are entering should work. in the following video, i explain exactly why you are getting tis error, and the use of the "attach" command, etc: kzbin.info/www/bejne/Z3PGeKF-rLqHbM0 id also recommend watching our videos in order, as we have arranged them in a way that, while self-contained, each videos builds on the next. here's the link to the full playlist of R videos, if you wanted to check those out: kzbin.info/aero/PLqzoL9-eJTNBDdKgJgJzaQcY6OXmsXAHU
@gm-123-0
@gm-123-0 8 жыл бұрын
Do you know any method to get path for the standard wd? (not to set it)
@marinstatlectures
@marinstatlectures 8 жыл бұрын
Hi +Giappoman , sure, just enter *getwd()* and R will return the path for the current working directory
@gm-123-0
@gm-123-0 8 жыл бұрын
And what about I want to get the default working directory instead of the current one? Is there any command to do that?
@marinstatlectures
@marinstatlectures 8 жыл бұрын
if you start up a session, and just don't set a working directory, and instead ask for the path to the working directory, it will tell you the default. the working directory will be in the default location until you set it otherwise for a session. the default will usually be in the user account you are working in currently (e.g.) "Users/CurrentUserFolder"
@gm-123-0
@gm-123-0 8 жыл бұрын
It is not in "Users/CurrentUserFolder" (not on all the machines i am using). I need it later on, not only right after opening the session.
@nicoleweigelt3938
@nicoleweigelt3938 3 жыл бұрын
For some reason R does not let me edit anything in the console. Any idea why?
@tanushreedutta9474
@tanushreedutta9474 9 жыл бұрын
I am not understanding why u have introduced projectWD. If I simply code it like this setwd("C:/Users/hp pc/Desktop/New folder") even then when I type getwd() I get the same result ..so what is the importance of introducing a new variable.Kindly explain
@marinstatlectures
@marinstatlectures 9 жыл бұрын
Hi Tanushree Dutta , it's not necessary to do that at all, but can be useful for some things. the reason i do that is that sometimes you may be specifying the path to you working directory a few different places in your code. rather than type the full path each time, you can just save it in the an object called "projectWD", and then use that each time, rather than type out the full path to your working directory. but yes, it isn't really necessary at all.
@tanushreedutta9474
@tanushreedutta9474 9 жыл бұрын
Thanks sir.. I got that and your lessons are really very nice
@marinstatlectures
@marinstatlectures 9 жыл бұрын
thanks Tanushree Dutta
@ujwaldey4270
@ujwaldey4270 8 жыл бұрын
Why does RStudio on my pc always open with an already loaded workspace?
@kengking2708
@kengking2708 9 жыл бұрын
Hi M.M., Could I just check on why there is an error in loading? read as; Error: in readChar(con, 5L, useBytes = Tr8e): cannot open the connection. IN addition: Warning Message: IN readChar(con, 5L, useBytes=True): cannot open compressed file "C:/Program FIles/Users/Rstudio", probable reason 'Permission denied'.
@marinstatlectures
@marinstatlectures 9 жыл бұрын
Keng King sorry, but i can't figure this one out from a distance. is the file in your working directory, so that R can find it? also, it sounds like it's a compressed file...can you just uncompress the file, and then have R open the uncompressed file? id suggest trying out some of those. it can be difficult to debug from a distance, without context. good luck.
@diyashah9528
@diyashah9528 4 жыл бұрын
What should I do? Untitled1 coming again and again. I am unable to set working directory. I need some more
@marinstatlectures
@marinstatlectures 4 жыл бұрын
You will have to be a bit more specific, from your comment I have no idea what you’re issue is
@The075satyasai
@The075satyasai 8 жыл бұрын
can u plz do this specifically for windows ??it is showing lots of errors
@marinstatlectures
@marinstatlectures 8 жыл бұрын
Hi +Satya Sai , i'm sorry but i don't have or use Windows, so am not able to record anything in the Windows environment. but i can suggest this...if you work in RStudio, there should be a *Session* menu, if you go in there, there should be an option for *Set Working Directory...* , an d from there you should be able to set it up using menus, and not commands. try that out, and hopefully you are able to navigate your way through that. good luck.
@The075satyasai
@The075satyasai 8 жыл бұрын
Ok thank you sir!!
@sashasasha100000
@sashasasha100000 4 жыл бұрын
Each project should have .rproj file. It location is your root directory of project. From here you can use relative paths to different folders. No setwd() needed whatsoever.
@NomisIsGozulike
@NomisIsGozulike 3 жыл бұрын
Ok so for anyone who had issues with not being administrator on his Windows based computer. I had issues changing the directory with messages like "cannot change directory". You cannot use a folder which contains your operating system, so generally your SSD. This has caused countless issues for me to even get programs running properly and also R suffers from this. And people wonder why Apple has a market.... fk MS honestly (this has been an issue for years now)
@Venisor21
@Venisor21 7 жыл бұрын
There's one thing I don't understand. If you can use "=" to assign a value to a variable, why does everyone use "
@superstar3179
@superstar3179 6 жыл бұрын
When I save the workspace they say no working directory found.
@marinstatlectures
@marinstatlectures 6 жыл бұрын
it's hard to troubleshoot things like these from a distance, but here are some things that may help. have you tried setting the working directory? if you enter *getwd()* R will tell you the current working directory. if you are working on a work computer (or in a guest account or different user account on your computer) you may be trying to save to a working directory for which you dont have permission (or dont have write access). those are a few things id suggest to check... good luck!
@superstar3179
@superstar3179 6 жыл бұрын
@@marinstatlectures I have windows 10 in my computer and when I save the workspace it says no working directory found and windows defenender message comes and it says access blocked. How do we deal with it ? Although your lectures are very good but I am some problems in it .
@marinstatlectures
@marinstatlectures 6 жыл бұрын
I'm sorry, but i dont work with windows and dont know how to solve that issue. but it sounds like it is a permission thing (as it is saying access blocked). one suggestion i have is to try setting the working directory to something else (you can test it out by setting it to the desktop, as you should have access/permission to that)..id say try that out and see if you are not blocked there. and also try talking to someone with more knowledge of windows, as they may be able to offer better help.
@hellochii1675
@hellochii1675 8 жыл бұрын
When I try setwd, I got this error: Error in setwd("~/Desktop") : cannot change working directory However, I tried :> setwd("C:/Users/chichi/Desktop") # It works. Can anyone helps me?
@marinstatlectures
@marinstatlectures 8 жыл бұрын
it sounds like your computer may have different user accounts? and using the first command, it's not clear which desktop to set the working directory to. in your second command, you specify the full path to where you want your working directory.
@hellochii1675
@hellochii1675 8 жыл бұрын
Thank you so much for your help.
@latin_prologue
@latin_prologue 9 жыл бұрын
What is the difference between R and Rstudio?
@marinstatlectures
@marinstatlectures 9 жыл бұрын
Hi Kaustubh Joshi , R is the software, and RStudio is just user interface that sits on top of R and makes it more organized. (e.g.) if you open up just R, you get just the console. if you produce a plot, it appears in its own separate window, and if you want to work with a script, you open that in another separate window. RStudio organizes all of these...you get the console in one "payne" and you get the plots in another, and the script you run is in another. its just a way to make R more organized. i would recommend using it, although it isn't completely necessary. you will have to install R and RStudio, to use RStudio. once both are installed, opening up RStudio will open up R in the background.
@latin_prologue
@latin_prologue 9 жыл бұрын
MarinStatsLectures I cant believe you replied, and you answered it perfectly, thanks a lot.
@marinstatlectures
@marinstatlectures 9 жыл бұрын
you're welcome Kaustubh Joshi
@pavithrap769
@pavithrap769 8 ай бұрын
When I give the command save.image("Firstproject.Rdata"), Im facing unexpected invalid token ij save.image (""...... What should I do,sir?
@bakor9935
@bakor9935 9 жыл бұрын
Hi, thanks for this very interesting and helpful lectures! I am just starting the R project and have some questions. is it possible to have your email address or skype? I would like to ask some basic questions if possible. Thanks in advance.
@marinstatlectures
@marinstatlectures 9 жыл бұрын
Hi Bakhodir Rahimov , i don't offer personal tutoring, but i do try and answer questions as best as possible, when they are posted on our KZbin channel
@edoardosavioli1472
@edoardosavioli1472 2 жыл бұрын
eroe
@Jie-h3u3q
@Jie-h3u3q Ай бұрын
Very clear and useful! Thank you very much!
@김서현-n2r5n
@김서현-n2r5n 7 жыл бұрын
I really appreciate your this awesome lecture videos !!
Writing Scripts in R | R Tutorial 1.12 | MarinStatsLectures
6:22
MarinStatsLectures-R Programming & Statistics
Рет қаралды 179 М.
Working with Variables and Data in R | R Tutorial 1.8 | MarinStatslectures
8:10
MarinStatsLectures-R Programming & Statistics
Рет қаралды 352 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
Importing , Checking and Working with Data in R | R Tutorial 1.7 | MarinStatsLectures
8:46
MarinStatsLectures-R Programming & Statistics
Рет қаралды 460 М.
7 Outside The Box Puzzles
12:16
MindYourDecisions
Рет қаралды 101 М.
How to Install Packages in R | R Tutorial 1.13 | MarinStatsLectures
6:25
MarinStatsLectures-R Programming & Statistics
Рет қаралды 254 М.
Getting started with R: Basic Arithmetic and Coding in R | R Tutorial 1.3 | MarinStatsLectures
7:48
MarinStatsLectures-R Programming & Statistics
Рет қаралды 559 М.
Сборник Эксклюзивов 2024 - Уральские Пельмени
1:33:24
Уральские Пельмени
Рет қаралды 1,1 МЛН
How to use the Obsidian Dataview plugin
16:11
Nicole van der Hoeven
Рет қаралды 226 М.
Lubridate - how to manipulate date and time data in R
18:05
R Programming 101
Рет қаралды 13 М.
Import Data, Copy Data from Excel to R CSV & TXT Files | R Tutorial 1.5 | MarinStatsLectures
6:59
MarinStatsLectures-R Programming & Statistics
Рет қаралды 913 М.