Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,440 --> 00:00:06,780
Hello everyone and welcome to the guide to our studio in this lecture which is going to be giving you
2
00:00:06,780 --> 00:00:12,150
a tour of the various functionalities that our studio will provide when you're programming in our programming
3
00:00:12,150 --> 00:00:13,500
language.
4
00:00:13,500 --> 00:00:17,010
Let's go ahead and jump to our studio now.
5
00:00:17,010 --> 00:00:17,520
All right.
6
00:00:17,520 --> 00:00:19,400
So here we are our studio.
7
00:00:19,560 --> 00:00:24,370
And you'll notice we have various panes or windows open within our studio.
8
00:00:24,420 --> 00:00:30,570
We have the console here on the left and we also in an environment and a history tab.
9
00:00:30,570 --> 00:00:33,920
Sometimes the environment is also known as a workspace tap.
10
00:00:34,260 --> 00:00:39,310
And here on the bottom right we have some files in this tab.
11
00:00:39,360 --> 00:00:44,660
So let's go ahead and just explain these various windows and screens and show you what they do.
12
00:00:44,730 --> 00:00:50,820
You may see some R code throughout this tour of our studio or if you don't fully understand it we'll
13
00:00:50,820 --> 00:00:53,970
teach you all about our programming later on in the course.
14
00:00:53,970 --> 00:00:58,380
Right now we're just giving you a basic feel for how to use our studio here on the left.
15
00:00:58,380 --> 00:01:00,090
We have the cons..
16
00:01:00,180 --> 00:01:04,490
So the council is where we can type direct commands and see output.
17
00:01:04,500 --> 00:01:07,620
So we've actually already used this in the installation video.
18
00:01:07,650 --> 00:01:13,530
We'll go ahead and show another example that can do something like Prince.
19
00:01:13,700 --> 00:01:18,290
And you'll noticed you'll get a lot of helpful pop ups show up in our studio.
20
00:01:18,420 --> 00:01:24,570
So as you begin to type functions that exist in our our studio that will automatically pop up suggestions
21
00:01:24,630 --> 00:01:26,590
or auto complete code for you.
22
00:01:26,610 --> 00:01:30,770
So here it pops up some information about the print function.
23
00:01:30,990 --> 00:01:34,960
So go ahead and says something like print's it's arguments etc..
24
00:01:35,340 --> 00:01:40,710
So we're going to do is do an open parentheses again you'll notice our studio automatically adds closing
25
00:01:40,710 --> 00:01:43,380
parentheses in a file type in a single quote.
26
00:01:43,500 --> 00:01:51,980
It automatically adds the closing quote and we'll just go ahead and say our studio is nice.
27
00:01:52,320 --> 00:01:54,920
I'll click enter and since is a con..
28
00:01:54,950 --> 00:01:58,540
I have directly typed the command and I see the output directly.
29
00:01:58,710 --> 00:02:02,060
Now let's explore this environment tab right here.
30
00:02:02,220 --> 00:02:06,510
So this is going to show all the active objects in my environment.
31
00:02:06,750 --> 00:02:08,000
So what that means is I.
32
00:02:08,190 --> 00:02:15,150
As I assign various variables values so I'll have a bunch of variable names and they'll have different
33
00:02:15,150 --> 00:02:18,450
associated values to them or objects or data structures.
34
00:02:18,450 --> 00:02:20,760
This tab is going to go ahead keep track of that.
35
00:02:21,000 --> 00:02:29,280
So for example let's go ahead and start of a variable called a in a sign at the number 2.
36
00:02:29,310 --> 00:02:32,890
Don't worry about this syntax will go over it in much more detail later on.
37
00:02:32,940 --> 00:02:36,720
Basically here I'm just assigning to the variable a.
38
00:02:37,410 --> 00:02:42,710
I go ahead and click enter and now in my global environment I can see that I have some value.
39
00:02:42,800 --> 00:02:44,870
And it has been assigned to.
40
00:02:45,300 --> 00:02:46,050
All right.
41
00:02:46,200 --> 00:02:52,680
So here at the bottom right I have a file's tab so the spiles tab shows all the files and folders in
42
00:02:52,680 --> 00:02:57,560
your default workspace as if you're just on either a PC or Mac window.
43
00:02:57,600 --> 00:03:03,840
Also if you end up using plotting in our studio you can click here on the plot's tab and your plot's
44
00:03:03,840 --> 00:03:05,160
will show up here.
45
00:03:05,640 --> 00:03:12,840
The next tab which is the package's tab will list a series of packages or add ons needed to run a certain
46
00:03:12,840 --> 00:03:16,460
process will get into packages much later on in the course.
47
00:03:16,530 --> 00:03:19,020
So don't worry about them right now.
48
00:03:19,020 --> 00:03:23,610
Here you have the help tab which is really useful if you have some sort of internet connection or a
49
00:03:23,610 --> 00:03:27,170
downloaded the are resources or manuals needed.
50
00:03:27,180 --> 00:03:32,640
You'll always find all the help you need throughout this helped including great resources for learning
51
00:03:32,640 --> 00:03:32,680
.
52
00:03:32,690 --> 00:03:35,170
Are are learning more about our studio.
53
00:03:35,630 --> 00:03:39,900
OK so let's go ahead and explore the workspace a little more.
54
00:03:40,290 --> 00:03:46,650
So again I have this environment tab which is going to store any object value or functions that I create
55
00:03:46,680 --> 00:03:48,470
during my R session.
56
00:03:48,540 --> 00:03:54,880
So in the example below I already created a variable A and assigned the number to just an integer.
57
00:03:54,940 --> 00:04:00,270
But for example if I do let's go ahead and make a vector called the.
58
00:04:00,410 --> 00:04:05,790
And don't worry about the syntax here and just showing this for example purposes I create a new object
59
00:04:05,790 --> 00:04:05,810
.
60
00:04:05,820 --> 00:04:07,090
In this case it's a vector.
61
00:04:07,140 --> 00:04:13,420
And here I see more information about the different values I have existing in my environments.
62
00:04:13,440 --> 00:04:16,380
You'll notice that right next to this environment tab.
63
00:04:16,590 --> 00:04:21,550
I have a history tab and the history tab keeps a record of all your previous commands.
64
00:04:21,540 --> 00:04:25,370
And this really helps when testing or running various processes.
65
00:04:25,470 --> 00:04:30,720
Here you can either save the whole list or you can select commands you want and then send them to in
66
00:04:30,780 --> 00:04:36,390
our script to keep track of your work when you're using our studio.
67
00:04:36,420 --> 00:04:41,150
It's more likely that you're going to want to actually select a particular working that rectory here
68
00:04:41,150 --> 00:04:41,260
.
69
00:04:41,280 --> 00:04:43,670
I've already selected a working directory for this.
70
00:04:43,680 --> 00:04:48,180
Our code will let me go ahead and show you how you could change a working directory if you wanted to
71
00:04:48,180 --> 00:04:51,220
change your working directory for this particular session.
72
00:04:51,300 --> 00:04:59,430
You just go to this session and this top tab and then go to set working directory and then you can choose
73
00:04:59,430 --> 00:05:01,070
directory here.
74
00:05:01,140 --> 00:05:05,580
A window will pop up and then you can go ahead and choose the directory you want to go ahead and Slik
75
00:05:05,590 --> 00:05:06,220
cancels.
76
00:05:06,220 --> 00:05:12,320
Since I'm already at the folder I want to be in so again go into session set working directory choose
77
00:05:12,320 --> 00:05:15,300
their victory will allow you to change the working directory.
78
00:05:15,590 --> 00:05:21,230
But you can also set a default or can directory that's directory that's going to default to every time
79
00:05:21,230 --> 00:05:22,520
you open our studio.
80
00:05:22,790 --> 00:05:31,490
You can do that under the Tools tab so you can go to Tools go to Options or global options and then
81
00:05:31,490 --> 00:05:36,680
here you'll get a little options window pop up and then which you can do is go ahead and select a default
82
00:05:36,680 --> 00:05:41,100
working directory and then you can go ahead and click Browse and choose the folder.
83
00:05:41,110 --> 00:05:45,200
Make sheet click apply and then click OK.
84
00:05:45,200 --> 00:05:49,560
If you ever want to figure out what directory you're in there's two ways to do this.
85
00:05:49,580 --> 00:05:53,960
You can either just go ahead and check here under the files tab the directory or under.
86
00:05:53,960 --> 00:05:55,430
It'll show you the path.
87
00:05:55,430 --> 00:06:01,890
Or you can click here in the console and type G E T W D.
88
00:06:02,450 --> 00:06:06,100
Close parentheses and that will get the working directory which is what.
89
00:06:06,120 --> 00:06:10,790
There'll be the stands for if you click enter it'll show up as a response.
90
00:06:10,820 --> 00:06:12,660
And there's my working there victory.
91
00:06:13,610 --> 00:06:19,130
If you want to set your working directory or change or working directory directly from the console you
92
00:06:19,130 --> 00:06:28,280
can actually use set W.D. parentheses and then type in the directory of wherever you want to set.
93
00:06:28,310 --> 00:06:32,150
So you would just type in here the file path to whatever new directory you want.
94
00:06:32,240 --> 00:06:36,380
I will go ahead and run that since I'm already at the directory I want and I already did it using our
95
00:06:36,380 --> 00:06:39,440
studios graphical user interface.
96
00:06:39,470 --> 00:06:44,330
Now when you're developing in our program or in our script usually you're not going to just input a
97
00:06:44,330 --> 00:06:49,740
bunch of functions or commands directly into the console which you're going to be doing is working with
98
00:06:49,740 --> 00:06:51,200
an R script.
99
00:06:51,200 --> 00:06:55,730
So an R script is where are you going to basically keep a record of your work and be able to run multiple
100
00:06:55,730 --> 00:06:57,470
commands all at once.
101
00:06:57,480 --> 00:07:03,590
Now what you can do in order to start a new script is click here on this little icon and then go ahead
102
00:07:03,590 --> 00:07:08,880
and select our scripts later on we'll discuss things such as are marked down and shiny webapps.
103
00:07:09,030 --> 00:07:12,250
But let's keep it simple for now and go ahead and select our scripts.
104
00:07:12,460 --> 00:07:15,020
Now you can see we have four windows.
105
00:07:15,020 --> 00:07:18,840
This is what you'll almost always be using when you're dealing with our studio.
106
00:07:19,040 --> 00:07:24,650
So you have the console window the workspace or global environment that history window over here on
107
00:07:24,650 --> 00:07:25,700
the top right.
108
00:07:25,820 --> 00:07:30,230
You have the files plot's packages isn't help when though here at the bottom right.
109
00:07:30,440 --> 00:07:33,320
And here the top left you have your scripts here.
110
00:07:33,350 --> 00:07:39,050
My script is currently untitled so our script is we're going to basically keep a record of your work
111
00:07:39,050 --> 00:07:42,200
and be able to run a bunch of our commands all at once.
112
00:07:42,350 --> 00:07:46,680
So maybe if you're coming in from another language such as Python you can think of this is just a dot
113
00:07:46,780 --> 00:07:48,440
PI file.
114
00:07:48,440 --> 00:07:49,190
All right.
115
00:07:49,910 --> 00:07:54,970
Let's go ahead and see an example of using in our script to run some commands.
116
00:07:55,310 --> 00:07:58,420
So I'm going to go ahead and type out some R code.
117
00:07:58,430 --> 00:08:06,590
We'll just go ahead and use simple print statements saying the say print first line and then I'm going
118
00:08:06,590 --> 00:08:11,120
to go ahead on the second line of code here and go ahead and say print.
119
00:08:12,260 --> 00:08:13,460
Second line.
120
00:08:13,970 --> 00:08:14,810
All right.
121
00:08:14,810 --> 00:08:18,190
So here we have my our script.
122
00:08:18,200 --> 00:08:20,580
Notice right now it's untile and not saved.
123
00:08:20,770 --> 00:08:23,060
I go ahead and click this floppy disk icon.
124
00:08:23,090 --> 00:08:32,360
It will save it and it will have to name it's going to go ahead and say this is Demo click Save it automatically
125
00:08:32,600 --> 00:08:33,860
put the extension demo.
126
00:08:33,900 --> 00:08:35,150
Are here for you.
127
00:08:35,300 --> 00:08:38,390
So I have my script all ready to go.
128
00:08:38,390 --> 00:08:44,780
You'll notice here I have a run which is going to run the current line or selection and then I also
129
00:08:44,780 --> 00:08:51,290
have source which sources the contents of the active documents and in between those I have a rerun the
130
00:08:51,290 --> 00:08:53,110
previous code but.
131
00:08:53,930 --> 00:08:56,730
So let's go ahead and explore each of these buttons does.
132
00:08:56,960 --> 00:09:02,400
If I select here I can go ahead and highlight or just have my cursor on the first line.
133
00:09:02,570 --> 00:09:04,250
So print first line.
134
00:09:04,250 --> 00:09:05,900
If I go ahead and click run.
135
00:09:06,230 --> 00:09:11,430
Notice I just get here on my console which displays the output print first line.
136
00:09:11,480 --> 00:09:14,800
It didn't run everything in the script.
137
00:09:14,900 --> 00:09:22,060
And again if I have my cursor or if I highlight select the entire second line and then click run.
138
00:09:22,220 --> 00:09:26,940
It's just going to execute where the cursor was on that line.
139
00:09:26,960 --> 00:09:29,130
So it's only going to do one line at a time here.
140
00:09:29,300 --> 00:09:31,040
So that's what the run button does.
141
00:09:31,040 --> 00:09:33,860
It runs that either the entire selection you have.
142
00:09:33,860 --> 00:09:40,340
So if you highlighted a bunch stuff will run it or just the current line.
143
00:09:40,340 --> 00:09:46,550
Now if we go ahead and click here on the source you'll notice we get everything output.
144
00:09:46,550 --> 00:09:49,650
So this is basically going to run the entire source script.
145
00:09:49,670 --> 00:09:55,100
And in this case you can see here on the console we have first line second line and you'll notice here
146
00:09:55,100 --> 00:10:00,940
that the command was source and then it just relays the entire path to that dot our code.
147
00:10:01,430 --> 00:10:01,970
All right.
148
00:10:02,180 --> 00:10:11,150
So those are the basics of our studio writing our scripts and using the history in environments windows
149
00:10:11,240 --> 00:10:13,280
in our studio.
150
00:10:13,280 --> 00:10:18,950
As we begin to learn more about the our programming language we'll explore our studios other capabilities
151
00:10:18,980 --> 00:10:22,120
in more detail later on.
152
00:10:22,130 --> 00:10:28,190
The last thing I want to discuss is setting up customizing the appearance of our studio.
153
00:10:28,190 --> 00:10:30,560
So right now you'll notice the fonts pretty small.
154
00:10:30,650 --> 00:10:37,460
So when I'm teaching everyone in this course what I'm going to do is actually make the font larger and
155
00:10:37,550 --> 00:10:41,520
I'm going to go ahead and make the background dark instead of white.
156
00:10:41,540 --> 00:10:44,420
So let me go ahead and show you how to do that.
157
00:10:44,570 --> 00:10:51,650
You can just go to Tools Global Options and Global Options is the window where you're going to be able
158
00:10:51,650 --> 00:10:55,760
to change pane layouts Appearance's packages etcetera.
159
00:10:55,880 --> 00:10:57,570
So there's a lot of options here.
160
00:10:57,950 --> 00:11:04,220
And if you just click on appearance here you'll have the option to choose your editor font and your
161
00:11:04,220 --> 00:11:06,600
font size how much you want to zoom in.
162
00:11:06,650 --> 00:11:10,450
And there's some example code here and I'll show you what it looks like.
163
00:11:10,580 --> 00:11:15,300
So I'm going to go ahead and select the font to be a little bit larger.
164
00:11:15,350 --> 00:11:19,980
And if you go ahead and select Ed. themes you can change the color themes for you.
165
00:11:20,240 --> 00:11:24,090
So go in and select the theme that you like the best.
166
00:11:24,380 --> 00:11:26,720
I'm going to go ahead and select mano Kai.
167
00:11:26,810 --> 00:11:33,350
It's really similar to Sublime Text Editor if you're familiar with that text editor software and if
168
00:11:33,350 --> 00:11:36,380
you want you can also play around with the font.
169
00:11:36,530 --> 00:11:39,500
I'm going to go ahead and keep the default.
170
00:11:39,500 --> 00:11:48,500
So let's go ahead and apply that make this a little larger at 16 apply select OK and you can see I have
171
00:11:48,560 --> 00:11:54,080
changed the appearance of my scripts and my cons..
172
00:11:54,350 --> 00:11:59,120
So choose whatever is most readable for you what you like the best.
173
00:11:59,240 --> 00:12:02,000
Obviously that's personal preference.
174
00:12:02,000 --> 00:12:02,570
All right.
175
00:12:02,690 --> 00:12:04,080
That's it for this lecture.
176
00:12:04,190 --> 00:12:07,390
Hopefully that was a nice little tour an overview of what you can do.
177
00:12:07,400 --> 00:12:09,530
Our studio and how to use our studio.
178
00:12:09,660 --> 00:12:14,080
So it's going to be our main development environment where we're learning how to program with our.
179
00:12:14,150 --> 00:12:18,960
Don't worry we didn't understand all the art commands or our code that I showed in this lecture.
180
00:12:18,980 --> 00:12:22,730
We're going to be covering all of that later on when we actually learn how to program it.
181
00:12:23,330 --> 00:12:28,970
This lecture was just for showing and exploring the art studio development environments.
182
00:12:29,030 --> 00:12:31,850
OK thanks everyone and I'll see you at the next lecture
19502
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.