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!
@mounikareddy253210 жыл бұрын
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
@abisobowale869 жыл бұрын
Mr Marin! You are just the bomb! I am loving this like ice cream. God bless you for saving a career.
@marinstatlectures9 жыл бұрын
good to hear +Emmanuel Show !
@lakshmi89064 жыл бұрын
Thanks a lot! I was so frustrated with the lack of proper instructions online when I found this video.
@mathrock8892 жыл бұрын
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.
@javiermoralesds4 жыл бұрын
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-zb6ky10 жыл бұрын
the way concepts are presented in all these videos are really great..thanks Marin for all your help ...... !!
@marinstatlectures10 жыл бұрын
You're welcome ravi sharma , and thanks for your support!
@nazifataha88684 жыл бұрын
This is a blessing in my life. So detailed and clear to understand. I found it very simple to understand as a beginner
@diyashah95284 жыл бұрын
Hi Dear ... could you help me?
@ankitasrivastava60359 жыл бұрын
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. !!
@mathrock8892 жыл бұрын
same was the situation with them. thanks to you @Marinstatslecture...
@nishantthakar909910 жыл бұрын
Hey Martin! Thanks for creating all this Videos. Its Quite easy to understand for any newbie. Appreciate!
@vivek1999210 жыл бұрын
Best piece of work I have ever seen, in explaining a software! Very simple, yet highly effective. Thanks a ton!
@marinstatlectures10 жыл бұрын
Thanks vivek reddy , we appreciate you saying that!
@olivor_h8 жыл бұрын
Thanks for these videos, they're really easy to follow and understand.
@marinstatlectures8 жыл бұрын
you're welcome +Olivor Holman !
@pasupathyvasaha1685 жыл бұрын
The video was really helpful Martin...Thank you!!
@marinstatlectures5 жыл бұрын
you're welcome
@akbarkarimi45826 жыл бұрын
Thank you so much Mike for these great videos.
@emmasteigerwald26689 жыл бұрын
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!
@marinstatlectures9 жыл бұрын
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...
@4meSaints5 жыл бұрын
very very useful, saved me a lot of time with this!
@ProfArunkumarDubey6 жыл бұрын
Very nicely explained. Best wishes from India
@marinstatlectures6 жыл бұрын
Thanks :)
@zoyabelmesova16588 жыл бұрын
Very clear and helpful, thank you!
@marinstatlectures8 жыл бұрын
you're welcome +Zoya Belmesova !
@rayachercher Жыл бұрын
THANKS FOR YOUR BRIEF EXPLANATION
@almitra093 ай бұрын
Thankyou it was very helpful
@ahmedserag79068 жыл бұрын
Thank you for your nice lectures. It really helped me a lot.
@marinstatlectures8 жыл бұрын
you're welcome +Ahmed Serag !
@madhu-ki-duniyaofficial9 жыл бұрын
I love to learn from yr videos thanks for uploading such a great video.
@marinstatlectures9 жыл бұрын
thanks +madhu sankhwar ! we're glad to hear you're loving them ;)
@Ikarus29858 жыл бұрын
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.
@marinstatlectures8 жыл бұрын
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.
@Ikarus29858 жыл бұрын
You are welcome!
@harmagician110 жыл бұрын
Excellent productions.
@marinstatlectures10 жыл бұрын
Thanks ***** !
@jopsilon92328 жыл бұрын
This is super helpful. Thank you for making these videos! It saves me sooo many hours!
@marinstatlectures8 жыл бұрын
you're welcome +Christian Kirifidis , glad we could help
@liutrvcyrsui3 жыл бұрын
quick and clear
@swarajghosh10010 жыл бұрын
Appreciate your work :)
@marinstatlectures10 жыл бұрын
thanks Swaraj Ghosh !
@mohammadmuneer646310 жыл бұрын
Awesome !!!
@nd.drones6 жыл бұрын
thank you
@ragulvr97449 жыл бұрын
should we use only forward slash for specifying the working directory and not backward slash? i.e only "/" and not "\"??
@maziark38618 жыл бұрын
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.
@marinstatlectures8 жыл бұрын
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.
@geess56844 жыл бұрын
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
@yuvenmuniandy82028 жыл бұрын
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.
@mmebella42977 жыл бұрын
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?
@bwww20119 жыл бұрын
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!
@marinstatlectures9 жыл бұрын
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
@bwww20119 жыл бұрын
+
@bwww20119 жыл бұрын
MarinStatsLectures Thanks Marin. Happy New Yea btw; have a great 2016.
@marinstatlectures9 жыл бұрын
Happy New Year to you too B Www !
@chukwudikeofodum68392 жыл бұрын
How do you change the working directory from cloud to local disc on Rstudio cloud online?
@daniele17173 жыл бұрын
best boy!
@sumitkumarsain55426 жыл бұрын
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!
@marinstatlectures6 жыл бұрын
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
@sanjeebkumar853910 жыл бұрын
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.
@marinstatlectures10 жыл бұрын
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.
@fisherman62466 жыл бұрын
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
@nboruett8 жыл бұрын
Great
@charitysmith14529 жыл бұрын
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
@marinstatlectures9 жыл бұрын
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-08 жыл бұрын
Do you know any method to get path for the standard wd? (not to set it)
@marinstatlectures8 жыл бұрын
Hi +Giappoman , sure, just enter *getwd()* and R will return the path for the current working directory
@gm-123-08 жыл бұрын
And what about I want to get the default working directory instead of the current one? Is there any command to do that?
@marinstatlectures8 жыл бұрын
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-08 жыл бұрын
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.
@nicoleweigelt39383 жыл бұрын
For some reason R does not let me edit anything in the console. Any idea why?
@tanushreedutta94749 жыл бұрын
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
@marinstatlectures9 жыл бұрын
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.
@tanushreedutta94749 жыл бұрын
Thanks sir.. I got that and your lessons are really very nice
@marinstatlectures9 жыл бұрын
thanks Tanushree Dutta
@ujwaldey42708 жыл бұрын
Why does RStudio on my pc always open with an already loaded workspace?
@kengking27089 жыл бұрын
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'.
@marinstatlectures9 жыл бұрын
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.
@diyashah95284 жыл бұрын
What should I do? Untitled1 coming again and again. I am unable to set working directory. I need some more
@marinstatlectures4 жыл бұрын
You will have to be a bit more specific, from your comment I have no idea what you’re issue is
@The075satyasai8 жыл бұрын
can u plz do this specifically for windows ??it is showing lots of errors
@marinstatlectures8 жыл бұрын
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.
@The075satyasai8 жыл бұрын
Ok thank you sir!!
@sashasasha1000004 жыл бұрын
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.
@NomisIsGozulike3 жыл бұрын
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)
@Venisor217 жыл бұрын
There's one thing I don't understand. If you can use "=" to assign a value to a variable, why does everyone use "
@superstar31796 жыл бұрын
When I save the workspace they say no working directory found.
@marinstatlectures6 жыл бұрын
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!
@superstar31796 жыл бұрын
@@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 .
@marinstatlectures6 жыл бұрын
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.
@hellochii16758 жыл бұрын
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?
@marinstatlectures8 жыл бұрын
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.
@hellochii16758 жыл бұрын
Thank you so much for your help.
@latin_prologue9 жыл бұрын
What is the difference between R and Rstudio?
@marinstatlectures9 жыл бұрын
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_prologue9 жыл бұрын
MarinStatsLectures I cant believe you replied, and you answered it perfectly, thanks a lot.
@marinstatlectures9 жыл бұрын
you're welcome Kaustubh Joshi
@pavithrap7698 ай бұрын
When I give the command save.image("Firstproject.Rdata"), Im facing unexpected invalid token ij save.image (""...... What should I do,sir?
@bakor99359 жыл бұрын
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.
@marinstatlectures9 жыл бұрын
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
@edoardosavioli14722 жыл бұрын
eroe
@Jie-h3u3qАй бұрын
Very clear and useful! Thank you very much!
@김서현-n2r5n7 жыл бұрын
I really appreciate your this awesome lecture videos !!