 In this video, I want to introduce you to the R programming language. So eventually we're going to start looking at the language itself. Now there's no ways that in a short video I can really introduce you to the whole of the programming language, but I'm going to show you the essentials, specifically those things targeted towards what we ultimately are aiming for and that's to write code that will do some deep learning for us. So once again, this document is available on our pubs. I'm going to put it out on GitHub as well. You can download this and install it. A couple of things that we are going to go through. You can see here that there is an interesting history to R and you can read some of that right there on Wikipedia. You've also got to download and install R. And if we move down here, you'll note that there and I'll put these links down below. There is a link here to how to download R for your specific programming environment for your operating system. So that would be for Windows, for macOS and for Linux. You can find all the downloads and install instructions there. It is simply downloading a file and running that file and it'll install. Now there's a beautiful program called RStudio and you see the link there. You must also download and install that. That creates an environment, a program in which we're going to write the code. And it's an absolutely phenomenal coding environment. And whether you are new to R or whether you are an expert, it just makes the writing of code such a pleasure. And it allows for the creation of much richer objects than just code. You can write a book. You can write documents, dissertations. You can create websites. You can create applications. There's just no end to its capability. So I really want you to install RStudio as well. It's simply following those two links. As I said, I'll link to that in the description to the video down below. And also where to download all these files, both viewing them on RPUBS, this document, which was created in RStudio, by the way, as all of these documents are, and to the files themselves on GitHub. So without further ado, let's get into a bit of the language. Well, at least first RStudio coding environment as all the knocking and banging outside my office where the construction of the new neuroscience unit has been done. It really is an earful. So apologies for that. Let's get started. Once you've installed R and then RStudio, you can open RStudio and this is what it looks like. Now I've installed R version 3.5.1, the newest version as of the time of this recording. You see it's codenamed as Feather Spray and installed it for 64-bit Windows system. And here we have it. It should be rather familiar to anyone who's opened a spreadsheet file before or a file or a word processing file such as Microsoft Word, etc. And we have this menu system up above. There's the normal file and you can do new file and save and save as. You can edit a few things, a few things that you might not see in usual programs, plots, sessions, build, debug, profile, tools. Tools is quite important because you can go down here to global options and you can set quite a few options. For instance, here in the appearance, you have some themes, some themes. The default here is Crimson Editor, Dawn, Dracula, Dreamweaver. You can really set your coding environment to look the way that you want. And I've increased the font size here to 16, so it's easier for us to have a look at in this recording. Now there are basically four panels. You can only see three at the moment, but they are four. One, two, three here. The fourth one is as we create a new file. So this panel here is actually the bottom left panel. It has a console and a console is very simple. You can just type lines of code here, two plus two. And I'm going to hit Enter and we see the solution there. Four. And there's a new line indicated there. The one here indicates that there's only one element in the solution. If there were more, they'd each have an address starting at one, the first element, the second, the third. That's what that one refers to. When it runs over multiple lines, my answer, the first element in a new line, it'll have its number here in square brackets. As simple as that. We also have a terminal here, which is very similar to a terminal that you might find in macOS or in Linux. What you might find in Windows as well. In Windows, we call it the command prompt, of course. So that's very similar. And you can interact with your computer if you know how to use that kind of code. Let's go back to the console. On the upper right, there's three tabs usually, the environment. And we'll see what happens as we start writing code, the history of code that has gone before, and connections we're not really going to deal with in this video series. On the bottom right, we have the files, which just shows the files in your current structure. And you can also navigate as you would in a normal explorer of your folder structure, your file structure on your computer. Plots, if we've created any plots very nicely, you can export these plots as PNGs, as PDFs. Packages is very important. As you read some of the history of R on Wikipedia, you might notice that there is this base or core R that can do a lot of statistical functions. But there are countless other libraries or packages that you can import that others have written. It's all open source. You can just install them, click on it and install it or hit install and then type the name of the package. It'll ask you what the default library is. And that is we are in 3.5. Some packages make use of other packages. Those are called dependencies. So just have that clicked as well. So those are also installed. So click the name of something, something for instance, like Plotly, which is a plotting library. We see it comes up there and you can simply install it now. It's available. It's extended the functionality of R. And there are so many of these. There's a fantastic help system. You can just type in the name of a function. And we're going to talk about what functions are. For instance, if you want to calculate the average or mean, the keyword function is mean. I can type in a mean. And we can search for that. Let's type it in the correct space. Of course, mean, there we go. Let's search for mean, there we go. That looks better. The arithmetic mean, how to use it tells you what arguments are and we'll go through what these things are very shortly. But a fantastic help system, just type in what you're looking for and you'll get some help on that. The RStudio website is also a fantastic resource just to look for help. Viewer is something I'll show you if we create documents or dissertations or books or whatever the viewer can display that for us. So let's just jump into creating a new file and then we'll simply see this little down arrow there for new. We could also go file, new file. And we see our script, our markdown and our notebook, our markdown shiny as a web applications. You can code in other languages, text files, presentations, documents, HTML files, so much you can do. Now we're going to create a new script. All the documents that you see in RPUB for the series are created in markdown and we'll have a quick look at markdown as well. But let's just create an R script and that's going to open up this top left panel here which was hidden. As you can see, there's the console and terminal now on the bottom left. So here we just write lines of code. So let's start with something very simple and that's just a comment. And the comments are preceded by a hashtag and I'm just going to say this is a comment. And if you want to leave comments for yourself as you write code, just leave comments. Anything in that line after this hashtag is just totally ignored. Now we see a number one there. That's our first line of code and to execute that line of code. As long as I'm anywhere in this line, I can just hit the run and that will execute that line of code. Now it's totally ignored by R because it is preceded by this hashtag. So I can just hit enter and move down a little bit, create myself some space. So let's leave ourselves a comment that we're going to write some simple arithmetic. If I can spell that arithmetic in this section. So there we go, simple arithmetic and let's do the two plus two again. I like to use spaces. You don't have to use spaces. So I've got two plus two there. I'm going to click run and there we have exact same thing down in the console here. We see the four and there's only one element there. So we see the four. So you can try anything else. Let's try some trigonometric function. Let's ask for the sign of Pi, the sign function, and we want Pi over two. So that's 90 degrees, Pi being 180 degrees, Pi radians. And I executed it this time by just holding down the control or command key if you're in a Mac, control for PCN windows and hitting the enter key. And instead of being in that line and running, I can do the same thing, holding down control or command and enter. And we see the sign of the Pi over two or 90 degrees is just one. So there's so many, let's do two minus two. I'm holding down control, hitting enter and I see that is zero. So really try some of these in the help section here. If we go there, let's just see what the cosine function would do. And it tells me there, you know, shows me the other trigonometric functions there and you just do that. Now a function is, after a function, you see these parentheses and then you pass something to the function. And these, this something that is called an argument. You always pass an argument when you call a function. Calling a function means writing it and then hitting control, enter, return. Control enter or command return on a Mac. And then you get, you get this solution. That's when you call a function, but you have to pass to most functions, at least you pass an argument. And then in the details here, it'll tell you, it says there the arguments. You can pass two arguments, numeric or complex vectors and we'll get to what vectors are in a little bit. So there are so many of these inbuilt functions in trigonometric, transcendental. So many built-in functions for arithmetic and I really want you to play around with those. The next thing I want to just talk to you about is an object. Also, we can also refer to this as a computer variable or computer variable name. So I've written something there 2 plus 2, but I might want to store that value for later use so that I don't have to write that in all the time. Let's create a computer variable and you can use any word. Try to use words that are descriptive. So when you refer back to this later in your code that you know what is stored inside of that object. Now an object really is just the space that is created in your computer's memory in which that object is stored and that object has a type depending on what kind of data it holds. So let's create this computer variable and I'm just going to call it something like my text. As I said, there's some restrictions on this. So don't use words that are already built into, don't use sign for instance, the SIN as a computer variable or object name that already exists. So don't overwrite that and don't use illegal characters such as spaces. Now there are some conventions that some people stick to. This is a camel case. In other words, there are two words there, my and text. There's no space between them. The first letter is lowercase, but each subsequent word starts with an uppercase. So that's one way of going about it. Some people use snake case. That will look something like this where the words are strung together with underscores. Another popular way is just to put dots in between. So my dot text. So let's do that. And now instead of using an equal sign, which you can, but let's just use the convention, which is this symbol. I'm going to hold down alt on a Windows or PC or Linux. Hold down the alt and hit the minus sign. And you see this less than and minus sign come up. That is equal to an equal sign. Let's put it that. It's an assignment operator. I'm assigning something to this object called my text. And since I've called it my text, let's pass some text. Text is always passed inside of quotation marks. I'm going to say this is text. I'm going to hold down control and hit enter or command and return. And I now have my text. Look what happened on the right hand side here under the elements tab. Under values, there is a new variable called my dot text. And what is held inside of that. Get this list of all the things that you've created. And what the value is that's held inside of this object. And just remember everything has a type. So the type of the content in this object is a string, a string because it's inside of quotation marks. Let's create another one. I'm going to call this one my answer. So I'm using camel case in this instance, holding down alt and minus or option and minus. And I'm going to store in that my answer is the solution to two plus two. Control enter, command return. And we see my answer is now there and it's four. And later on in my program, I can just use my answer. And as I type it, a tip even comes up and it says, well, M, Y, A, there's something that already exists. So I can just hit tab and it'll auto complete for me. If I now hit control and enter, command and return, we see the solution pop up here in the bottom. My answer, it holds the value four and the four is printed there. So that four is always stored inside of my answer and I can reuse that all the time. That makes it very, very useful. So next on, let's move on to something called a list. So let's do this. Let's do that. There we go. Let's do lists. A list is just something that is more than a single element, although even a single value like four is actually also a list. And R refers to these as vectors. Everything is stored inside a vector, which is just a list of elements. And a single value, of course, is also a list, a vector. And if it's a list of integers, it's a numerical vector. And if it's a list of text, it's a text vector. And that's just the term that is used. So let's create one. And I'm going to call this one temperature. Temperature, I'm going to hold down Alt and minus, Option and minus to have this assignment operator. And the way that we put lots of elements together is to group them inside of a vector. We separate them by commerce, but we use a function called C. I suppose for we concatenating something, we're putting something together C. So let's have some temperatures here. Let's have a temperature of 72 and 69 and another 72 and a 70, a 70. And there's four numbers. Let's make them the more barmy 85. I'm going to hold down control and enter or command and return. And now we see temperatures saved up there. Now look at it. It says it's a numerical vector and it has five elements. So these are the addresses one. The colon means through one through five. So there's number one. There's number two. There's number three. There's number four. There's number five. So that is a list. I just want to show you another quick way to do this. Let's create another one. I'm going to call this one my list using camel case. And I'm going to assign that a sequence. I can create a sequence of value with the SEQ. And you see SEQ comes up there. There's actually a little tool tip there. And it says if you hit the if one key, let's do that. The help actually opens up and it gives you the sequence there and how to use the usage, the arguments that can be passed, some more details, all the help for sequence. Now the simple way to use sequence is to state a start number. So I'm going to say started one. Stop at 10 and go up in steps of one. Let's execute that. And we see what we have here is my list. It's numbers. There are 10 places. And it is the numbers one through 10. I did one. I ended at 10 and I went up in steps of one. So to create sequences can be quite helpful. If you want to know how many elements there are in that, just simply use the length function. So I'm going to say what is the length of my list. And very quickly it's going to tell me it has 10 elements in there. It just counts how many there are. So that's quite useful. The next thing I want to talk to you about is just some four loops. Let's do that. Let's do four loops, four loops. Now that is how you iterate through something. I'm going to iterate through a piece of code over and over again. But I'm going to control how this iteration works. So let's create a variable. I'm going to call it my numbers. Computer variable and object assignment operator. I'm going to use a sequence. And the sequence starts at one comma ends at 10. Let's go up in steps of one. Let's do that. So I have my numbers now. They're similar of course to my list that we just created above. But I'm going to do that. Let's create something that holds a zero. And I'm going to call that sum.total. And in sum.total I'm going to store the value zero. Hold down control, hit enter. Or command and return on a Mac. And now we have this sum.total. Now I'm going to create this four loop. And the key word is four. And I type in four. And then I'm going to put in parentheses what I want to happen. I'm going to use a placeholder. You can use any placeholder. Many people use i. Let's use i now. So for i in my dot numbers. And you see the little tooltip coming up. I'm just going to tap for auto completion. So what does this say? It's actually very close to just normal English. It's saying for i in my numbers. And you can see my numbers is 1, 2, 3, 4, 5, 6, 9, 9, 10. So you can well imagine for i in my numbers means, well, first take the one, then the next one, which is a two, then the next one, which is a three. You know, just go through each of the elements that are held in the numerical vector called my numbers. We're just going to iterate through that. And then after that what I want to happen during each of these loops must go inside of curly braces. So I put my curly braces there. And whatever has to happen happens inside of these curly braces. Now it's useful just to hit enter return here and you see there's this automatic spacing that happens when I was between those two braces. The last one went to the bottom and there's this bit of padding there. It just looks nice on the screen and that's something that RStudio is doing for you right here. So what do we want to do? Well, what we want to do is take some total. So I'm going to take some total. Remember at the moment that is zero. And now I'm going to use the equal sign and it's going to look weird the first time that you see this. I'm going to say sum.total again plus i. Now that doesn't look like a very good mathematical algebra there and certainly most computer languages don't work like algebra. What it does when it sees an equal sign or an assignment operator and as I say normally we use this assignment operator but inside of these loops we'll use equal. It says whatever is on the right hand side execute that first and then place it inside of what is on the left. So what is in sum.total at the moment? At the moment sum.total is an object and it holds a value zero. And i is at the moment is the first element in my numbers which is one. So it's zero plus one and that is one. And this one now gets passed to sum.total and it gets that piece of memory that memory in your computer gets overwritten where it had the zero in it before now it holds the value one. So it's going to go through the second time. Now remember i moves to the next element which is two. Sum.total still has the value one in it. i is now two. One plus two is three. Three is now passed to sum.total which now holds the value three. And we go through each of these. So let's run that. And let's call sum.total sum.total and see if i take the numbers one through ten and i add all of them together what am i going to get? Well i get 55. We can see the 55 at the bottom and we can see sum.total has been updated here on the top 255. So that is very convenient just to run through some code just doing something over and over again and then extracting some useful information from that. Let's move on to functions and we're going to use what we've just done now inside of functions. Now we've seen a little bit of functions before we've seen what the sign function looks like and we know that it's built into R and we have parentheses around that when we pass an argument to that. Say for instance i just want to calculate the average of the values one, two, three, four, five, six, seven, eight, nine, ten. So there's a built-in function called mean and i'm just going to pass my.numbers as an argument to the mean function and we see at the bottom it's 5.5 So the mean of one, two, three, four, five, six, seven, eight, nine, ten is 5.5 Now this one's going to be a bit difficult i want you just to concentrate now and i want to show you something very beautiful actually in that we can create our very own functions so i'm going to call my function my.mean just to be different from the inbuilt mean function so i'm going to give it my.mean it's an object i give it a name but i want to tell R that this is not a normal object that this is actually a function so i'm going to use my assignment operator and i'm going to use the function keyword just to tell R that my mean is not a normal object it's actually a function and remember a function has arguments passed to it doesn't always have to be there are some functions that don't have arguments you still use the parentheses though but i'm going to put just a placeholder in there and i'm going to call it vales so i can refer to vales some value that i'm going to pass to my function so the argument has the placeholder name vales so in mean we pass remember some total as an argument the same here with vales but it's just a placeholder so i've got this function and again what happens to it must go inside of curly braces so in between my two curly braces the second one was automatically put there when i opened the first one i hit return or enter so that it makes a new line and it looks really nice and neat so what i want to do inside of this i want to recreate the mean function remember the mean adds all the values and divides by how many they are so i'm going to create a computer variable the number dot of dot elements it's a descriptive one i understand what it means so i'm going to assign to that i'm going to assign the length of whatever the argument was that is passed remember length just tells me how many elements they are and what i pass so that's one i want to create another one called cumulative cumulative dot total and i'm going to initialize it with the value zero the next thing i want my function to do is go through a for loop so i'm going to say for i in vales and that's exactly what we did up before so it's just going to iterate through everything that i passed to this again what happens goes inside of my curly braces what i wanted to do is to say cumulative dot total equals cumulative dot total plus i so exactly the same as we did with the for loop before so whatever i passed to my function my mean is it's going to iterate through all of them and it's going to sum all of them up the first one plus the second one plus the third one exactly as before so now i want to go outside of my set of curly braces for my for loop because that's all i want my for loop to do now i'm back in the curly braces of my function and what i wanted to do is to return something so return is a keyword and whatever is inside of these parentheses it returns and what i want to return to it is the sum total divided by how many there are so it's cumulative dot total divided by number of elements number of elements that's what i wanted to return and i'm going to just go outside of that curly braces hit enter, a control and enter command and return and i now have a new function and we see it appear there my dot mean and that is a function let's test it out so i'm going to say my mean my dot mean i'm going to call that and i'm going to pass that my numbers to it the my dot numbers that we created the 1 through 10 remember i'm going to pass that and i see my solution again is 5.5 just as the inbuilt mean function was so pause a bit look through this function again it really is plain English it tells you what it's trying to achieve and it's very expressive now these things that i create inside of the function they are these local variables and something that i create outside of a function those are global variables i'm not going to go into that but you can read up you can read up that exists for many computer languages but it is should be quite simple to figure out what is happening here i've created a function called my mean it takes an argument which i can pass to it and in this instance i pass my numbers to it what i want to do is to have two things sum up all those values that is passed as this argument i want to know how many they are so that i can return this total divided by how many they are which is the equation for arithmetic mean and to do that i went through this there is an inbuilt function of course in R that can do this for you but i use this for loop inside just to go through each of these and just add them so you can create your very own functions the next thing i want to show you is just to how to load a data set now how to do that i'm going to actually open the source document that i created for our pubs and that is on github so this looks very different this you see it's a tab there this is the script file we've created and we can save that on this side we have an R markdown file so when i said file new this was not a script but a markdown file and a markdown file is like html that you would know in a website so you still see the lines of code on the left hand side it starts off with something this will be created automatically this is YAML, Y-A-M-L just another markup language a markup language is just a well in some sense you can see it as a subset of the full set of html code which is used in websites the language for websites so it sets out a title an author and an output i want this to be outputted as an html document a table of content to be set to true and that's where you see that table of content on my rpubs files and i don't want the sections numbered and now what happens is you can write normal paragraphs and create all sorts of nice things but the R code itself has to go inside of these three ticks so that's on the top left of my keyboard next to the one key there's one, two, three of them which indicates we're starting the R code and one, two, three ticks we've ended it now this is some automatic setup for this page don't worry about that i've also included some style, a cascading style sheet here don't worry about any of that i'm just saying colorize my large headings with this color, my second largest headings with this color my third largest headings with that color just creates a bit of color in my documents you see the orangey gold and the blue that i always use this is my png file which is the logo and this is how i get that to be expressed two hashtags here those not comments this is outside of the code that just says heading number two so that gives me a fairly large heading and that heading is introduction and then i start writing normal normal paragraphs, normal english paragraphs i write all of that and if i want something to look like code i put that inside of these single little tick marks write more normal code write more normal code and here two hashtags that is markup language and it says do heading number two again so that's larger normal text, normal text heading, normal text, normal text heading etc etc etc i want this these to appear as code they're not executed just as code so they go inside of those single ones you see these two dollar signs here whatever i put inside of these two dollar signs is called LaTeC and LaTeC is a way to write mathematical expressions and you see there the oilers number e to the power one you see how that is created single little underscores before and after word changes that word into italics so that will be printed in italics if i put two of those that will change to bold i can open and close a word or a sentence or some piece of a sentence part of a sentence in these and that becomes italic and you can see it goes on and here i want to execute some text so those goes inside of three of these little ticks and it actually has something on the right hand side i can actually run that content it's called a chunk this piece of code is called a chunk that is something that we write here and it's called a chunk and i do that just telling it that we are writing an R because you can specify other things inside of these sort of curly places says R code is about to follow and we close that R code and that's how we go about it so just want to go down to the section i want to get to there was the section on the four loops and you see the code written there i can execute that code by just hitting that run that current chunk and we see the functions bit coming up there and there we are with loading the data now when i create a file i can save the file somewhere on my hard drive now this document is already saved you see this little save icon there is blanked out it's saved at the moment if i change anything that will light up again so i can save the changes so i like to save these on my hard drive somewhere and if i want to import a spreadsheet file that contains some data if i want to work inside of a spreadsheet file i want to import that file what i usually do is i save both this file and that spreadsheet file containing the data inside of the same folder on my computer's hard drive or solid state drive so that they both in the same and i can ask use this getwd get working directory function if i write that line of code it will tell me the address to on my hard drive or my solid state drive where this file is saved but i can also set a working directory so i'm saying set working directory to the get working directory so it's going to go out and see where is this current file saved and then pass that to set working directory so that this document says when i look for files i'm going to look inside of this directory where or folder where this our document is saved anyway so that if i want to refer to a file i can just simply refer to that file here we have logisticregression.csv comma separated value spreadsheet file and i don't have to type the whole address to it so on windows that would be c, colon, backslash, blah blah blah and of course on mac that will be different but i don't have to refer to that because i've set the working directory to the current working directory where this file is saved and i know i've saved logistic regression in the same folder or directory that this markdown file is saved in so i don't have to refer to that long address and to import a spreadsheet file i use the read.csv this is a csv file so i'm going to call the function read.csv pass this as an argument inside of quotation marks and i'm going to pass that to this object that i'm conveniently calling data so let's set this working directory first by running that line of code and you saw the little green there as that got executed and now we're going to import that line of code and run that line of code so data is now imported and if i look up here i see there's new data so that was values we had functions before but now on the top here we have data and if i click on this little square on this side it's actually going to open something on the tab it's very small to see but there you can actually see the spreadsheet file beautiful and that's why i say this is such a lovely coding environment and now i can actually play around with this filter some of the data beautiful environment here but let's get back to my file so that's imported in data now i can also call the view function with a uppercase v that will do exactly the same as clicking on that little square at the top there this is close down this bottom left and that is how you import data and that data is now ready to be used we're going to use data in this way when we do create our deep learning or deep neural networks now we're going to use tensorflow in this course tensorflow of course is Google's open source framework for tensor calculations those are the calculations and the framework we need to create and run our deep neural networks and we're also going to install keras now keras just sits on top of tensorflow it can also sit on top of other frameworks but we're going to use google's tensorflow and it just makes writing code a lot easier it's much simpler code it looks like r it's very easy to do so you don't have to do the laborious coding that is sometimes involved with tensorflow there are new versions of tensorflow coming out which is going to make the writing of code slightly easier but keras has become so popular that it's even built into versions 1.9 and up of tensorflow so you write a simple line of code it recreates that more complex tensorflow code behind the scenes so that you don't have to write that complex code but it's the same thing it's still going to be tensorflow code so to install tensorflow I want you to install two packages first one is called reticulate so you can come here to packages hit install type reticulate and install it and the second one is called devtools tvtols and you're going to do that in exactly the same way now if you're on a windows machine install rtools as you can see there rtools and click on that link which is in the document I linked to it as well so on windows you have to install that rtools for devtools to work so install devtools and reticulate on windows also install this rtools the rtools you have to do from the website with devtools and reticulate you can do that right here and then we're going to install tensorflow and keras now to install these simply follow this link once again in the description below it is very simple to install the tensorflow and keras using devtools the description cannot be easier on these websites just go to tensorflow.rstudio.com fort slash keras it'll show you how to import tensorflow and keras now for tensorflow there are two versions there's of course the normal cpu version that'll run on your computer no problem but if you have an nvidia graphics processing unit a gaming card you can use the gpu version that is much faster than a cpu it allows for parallel execution tensorflow can use those gpu cores cu.core so it's got to be an nvidia gpu and it'll run a lot faster now if you're in a normal laptop even if it does have an nvidia graphics card and I'm recording on just such a laptops and it has quite a high n graphics card in it it's still not enough when you get to very large data set specifically if you look at images as your data set to do some deep neural deep neural networks to learn from images you are very quickly going to run out of the capacity and specifically the memory capacity of that gpu and that's just going to be very frustrating so for the kind of things we're going to do in this course and if you're starting off with deep learning just install the normal cpu version it's going to run slower but it's still going to get the job done if you're adventurous or you have got a monster desktop with two titan x nvidia graphics gpu's and then go ahead and install the gpu version no problem so that was a very short introduction to r I think that's the basics that you require it is a lot to for you know in one video to get used to so perhaps pause go through it again these files are available play with them there's just one way to go about this though sit down and start playing it is fun it is a lot of fun and there's a great sense of accomplishment when you get something done so really I just wanted you to do it we're also going to write lines of code when we create our TensorFlow deep learning models so you will have to write some lines of code and as you write those lines of code in future videos that I will make you just you just pick it up along the way so it really is fantastic and an easy and nice way to do it this RStudio environment is fantastic I've stuck with I'm going to stick with R for this introductory series on deep learning because it is such a nice environment as you can see for yourself now picking up the language is very easy and then to write the same models in Python once you can do it in R it's just a breeze I mean it is the smallest tiniest little learning curve so if you want to move over to Python which is the natural language for TensorFlow it's just it's a no brain it's very easy to do and perhaps I'll make some videos just to show you how this works in Python as well stick to R for now I mean R is fantastic for normal data analysis normal statistics I'm going to use I use the term normal but just for that we're course and creating beautiful graphics graphs plots that you can put inside of your dissertations inside of your publications it's just a phenomenal environment as is Python I mean Python R there's this debate which one should you do do both that's just the solution to the problem just learn how to do both they are very similar there's some quirks specifically on the R side that you've got to use get used to the Python sites actually much much much easier so once again if you start with R that this makes Python a breeze and but learn how to use both that would always be my suggestion it really is not a stretch this is not difficult really not difficult to learn a computer programming language I hope I've got you excited I hope you feel comfortable that you can start playing in R now go and enjoy yourself