Extended Introduction to RStudio | R-Tutorials.com

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we will take a look at the our studio interface I will show you how to orient yourself in the software and I will also show you what the most important features of our studio are but before we can dive right into the program I want to clarify where we are in the our programming landscape you need to know that there are alternatives to our studio and you can even work without our studio our studio is a GUI that is a graphical user interface as the name indicates this interface makes it graphically appealing to work with our in other words our studio makes your life much easier for the most part it's a click interface that means the basic commands can be done without code only with mouse clicks those are commands like opening or storing your script import or export of CSV files package management and even the health features all of those tasks are universal in our no matter if you work in finance marketing or science you have to perform those tasks when everybody uses it it makes perfect sense to simplify it as much as possible our studio is free for the individual user there are proprietary versions for business use but most of you will run open source our studio I already said that our studio is a GUI which also means that it sits on top of another program in our case this program is our if you open our itself you would get a window like this one over here which is the console you can instantly see that this one does not look so user-friendly there are a few things that can be done via mouse clicks but it is much less than in our studio when you want to run our directly in the console you will have to code nearly anything yourself since I know that for many of you guys is your first and probably the only programming language in your life let's make it as easy as possible and let's make use of as much support as available life is complicated enough so at least our studio is on our side let's go back to our studio it is not the only GUI there are alternatives out there like the our commander in some of my courses I'm also using dis GUI the difference between our studio and our commander is that our commander focuses on a few topics like statistics and graphics these are very well implemented better than in our studio the problem however with our commander is that it relies on our base for the most part implementing add-on material is not that easy furthermore the interface itself is not as user-friendly as our studio many people use our studio and provide feedback therefore it just must be good to put it in a nutshell 95% of the times our is run via our studio alright so now that you know that this interface is not R itself but the graphical user interface we can take a look at those four windows in our studio of course there is a system behind those windows it might look a bit confusing when you have those different fields but don't worry it's actually quite simple to understand what those are about basically we have the upper-left window which is the script section this is where you do the coding since 2015 you have a coat checker also integrated here at the lower left field we have the console that is the analog to the our console we already saw there is the place where the actual calculation takes place the code is sent from the script section to the console when you run it with this tool over here this is also where you will find your results theoretically you could also write the code in here directly but that does not make a lot of sense because it would be hard to manipulate and correct the code in the console at the right upper window we have the environment it's an important field but it gets overlooked so often by the beginner keep one thing in mind and never ever forget it this is the place where all your objects you created in a given hour session unlisted here you can see what you have already calculated you can orient yourself where you are in your work schedule a very important field and down here lower right corner we have five tabs at once files lets you organize all the files you create store or import into our studio it is nice to have but you can do without this field the next one is the plot tab each time you produce a plot and you will produce tons of them in our this field will open and the graph is displayed you can export them here with this tool and you can scroll back and forth between your plots with those two buttons over here and you can clean out useless graphs with this button so that was the plot tab and now we will check out the most important tab in the lower right window it is the package tab this is where you will manage your packages it's a list of all the packages you have already installed on your machine if you do not yet have the package on your computer you can click here uninstall in the window you can then state the name of the package you want to download let's go back to the list basically you have different types of libraries here we have to use a libraries which are all the add-on packages I have downloaded myself over month and yes they do not come with your installation of our in our studio like the system library packages in this list you already have on your machine since they come automatically with our base note that when you have an add-on package a user library like this one over here you need to activate it you cannot use all the functions in the library if you do not have it activated you just need to tick this box over here and you're ready to go this is extremely simple with our studio it works without a single line of code the next tab is the help tab which is nearly as important as the packages tab you would go to this tab if you want to find out more about the specific function or you can even get user manuals about our each our function in each package has documentation available that means you can learn how the function is structured which arguments you can use in the function and what the output will look like understanding how to use the help function is very important and can save you plenty of time the last step is the viewer which I will omit here since you will likely not use it at the beginners level so now that we took a quick tour around the our studio interface we will take a look at a simple our scripting work step you will instantly see how the different fields seamlessly work together and you will also see why so many data professionals enjoy the our studio user experience the first thing you should do when you start your work is to create a script if you do not yet have an empty new one it's the same thing in Excel you open Excel you get the worksheet and you store it right away this makes sure you do not lose your work for any odd reason in our studio we simply click on this plus sheet over here and we're gonna select our script this now opens a second script here in the script field it is now untitled and we could simply delete it again by clicking this X over here to save the script we click this disk and select a location on our computer and then we need to name it in this case I'm simply calling it test with the extension dot are you can tell that this is in our script alright so now that we have our script created we can start coding coding in our most of the times means creating objects in this case we are creating the object my first object and this one is simply going to be a vector with the numbers 5 through 10 therefore I'm gonna state my first object equals 5 double dot 10 this is going to be a crucial moment for you when you are totally new to our or even YouTube programming many things are now happening simultaneously and it is so different to Excel or SPSS first of all I want to make clear that you can of course also use an arrow for your assignment in this case I'm using the equal sign which works as well I will now make sure that the mouse is in the line with the CODIS and then I will run it with this icon over here all right so let's take a deep breath and let's see which the prices our studio is going to dish out to us so that was the first line of code we have been running together lots of change in our interface basically there are now three things happening or not happening the first one is that this code was not sent from the script window into the console where the calculation took place as we can see with this code snippet down here at the very bottom of our screen but second in the console we do not really see what is in this new object there is no result no real output as you might expect but number three and this might have escaped your notice we have the new object now in our environment this is confirmed with this entry over here the computer now recognizes an object called my first object if we now want to learn more about this object we have several ways in how we can do this we can simply type the name of the object in the next line or you can use a semicolon and put it in the same line the same a caller is indicating a totally new code line so if we run this we would now finally get the output in the console down here it is the numbers 5 through 10 that is indeed correct because the double dots over here in our code indicate a series of numbers from 5 to 10 that was one way in how to display the data a more sophisticated way would be over here in the environment now this is a simple and short vector therefore the whole vector is shown we get the information that is an integer vector int or int stands for integers which are whole numbers numbers without decimal and we also learned that this vector has a length of six there are six integers in it we can now go a step further let's simply plot those six integers against its index which is the position from 1 to 6 in the vector therefore we are simply using the plot function you this gifs say XY plot per default for this sort of data if we run it the command is again sent to the console but this time the console passes the data on it is sent right to the plot tab over here where the scatter plot is displayed it has six dots x values are the index numbers and y values the integers we provided in my first object since our studio programming requires many different windows it is important to know how to resize the windows I get those questions from time to time therefore I will demonstrate it here it is actually quite simple you have the icons to maximize and minimize over here watch out because sometimes a window might be fully maximized making its counterpart disappear in those cases simply click this button over here and you will have four fields again the same goes for the lateral left versus right size ratio just grab the center line and distribute the lateral screen space as you wish our studio is really flexible when it comes to segmenting your display now each time you open and our studio instance you will see that there is some general text about our the text contains some info on the license liability regulations and version ID of course after you have run code or in case you're irritated by the text just click in the console and press ctrl + L which will clear the console so that you get an empty console window again depending on your screen and how good your eyesight is the letters and numbers might be too small on the screen you can actually magnify your code therefore you would go to view and you can select zoom in or zoom out you can do this several times because this is a step by step zooming tool so keep this tool in mind when you have to deal with a small screen or your default setting is not satisfying to you another important features you have to keep in mind is the working directory when you perform extended analysis you will likely import and export several files it makes sense that these files all go into the same directory this is going to be your working directory the default directory are is going to store files in the easiest way to set the working directory is via session set working directory and then you can choose the directory of course you do not need to set the working directory each time you run our studio when you only make some small tests and you do not need several files you can just import and save files with manually selected directories all right guys I hope that you enjoyed our first walk through the our studio interface it surely is exciting to do this stuff for the first time don't be scared even when it might look too technical at the beginning I do know that our is totally different to Excel or SPSS but once you get behind it you will quickly realize that it is much faster and more powerful than those fully click supported software products in this video we learned that our studio is a graphical user interface for art it makes your life much easier especially as a beginner I showed you what those four different windows can do for you we even took a look at the 5 tabs at the bottom right window we were setting up and your script we were running a simple example with my first object which were even plotted against its index and I showed you how to resize your our studio windows would you assume in and out to make out better visible and we even were setting up a new working directory
Info
Channel: R Tutorials
Views: 15,788
Rating: 4.9815669 out of 5
Keywords: r programming, r language, r beginner, RStudio, RStudio introduction, R packages, R install package, R script, RStudio working directory
Id: pXd54-vucu0
Channel Id: undefined
Length: 18min 27sec (1107 seconds)
Published: Sat Jul 09 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.