All language subtitles for 2. Arithmetic in R

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian Download
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,990 --> 00:00:04,510 Hello everyone and welcome to the Arithmetike with our lecturer. 2 00:00:04,630 --> 00:00:10,050 It's going to be a relatively short lecture just showing how to do basic mathematics with our let's 3 00:00:10,050 --> 00:00:13,190 go ahead and jump to our studio. 4 00:00:13,200 --> 00:00:18,200 All right so here we are our studio and we're going to be just doing really basic math. 5 00:00:18,240 --> 00:00:22,380 We're just going to be using the console so don't worry about writing in our script for this unless 6 00:00:22,410 --> 00:00:24,830 you want to keep a history of what we've done. 7 00:00:24,910 --> 00:00:28,090 So go ahead and push the con. ups we can see it. 8 00:00:28,320 --> 00:00:33,800 And let me go ahead and just show you how to do some basic arithmetic with our first off just edition 9 00:00:34,220 --> 00:00:36,900 addition can be done with just a plus sign. 10 00:00:37,290 --> 00:00:41,400 And then you can almost These are just as a simple calculator which is basically going to be doing for 11 00:00:41,400 --> 00:00:42,300 this lesson. 12 00:00:42,460 --> 00:00:46,190 Go ahead and click enter to run that and you have one plus two is three. 13 00:00:46,380 --> 00:00:50,490 Again just the number and another number. 14 00:00:50,490 --> 00:00:51,470 Cetera. 15 00:00:51,750 --> 00:00:55,000 And you can do this with floating point numbers as well. 16 00:00:55,020 --> 00:00:57,950 So that's numbers of a decimal in them. 17 00:00:58,400 --> 00:01:02,980 You can see that the decimals are added up just as you would expect subtraction. 18 00:01:03,150 --> 00:01:05,990 As you might have guessed it's just going to be a minus sign. 19 00:01:05,990 --> 00:01:12,780 So do five minus three to notice that you're probably going to want to try your best to use spacing 20 00:01:12,780 --> 00:01:14,730 for readability. 21 00:01:14,730 --> 00:01:20,370 So here I would say five minus three is more readable in the second iteration than the first one. 22 00:01:20,490 --> 00:01:22,500 First one kind of looks like just five space. 23 00:01:22,500 --> 00:01:24,970 Negative three which is technically the same thing. 24 00:01:25,110 --> 00:01:30,080 The way are is going to read it but you always want to make your code as readable as possible for division 25 00:01:30,120 --> 00:01:30,400 . 26 00:01:30,520 --> 00:01:32,500 Just going to be a slash. 27 00:01:32,580 --> 00:01:38,160 So that's one divided by two 0.5 and the vision is going to perform what's known as true division. 28 00:01:38,160 --> 00:01:40,250 So Ill perform division. 29 00:01:40,320 --> 00:01:42,740 And keep in mind the decimals. 30 00:01:42,780 --> 00:01:50,460 So the remainders etc. all right for exponents or to the power of you can use a little carrot symbol 31 00:01:50,460 --> 00:01:50,480 . 32 00:01:50,490 --> 00:01:53,050 So that's above the 6 on a keyboard. 33 00:01:53,070 --> 00:01:56,250 So two to the power of three is eight. 34 00:01:56,610 --> 00:02:02,790 And do say four it's the power for 256 etc.. 35 00:02:02,880 --> 00:02:09,480 All right well one other note is that order of operations is followed in are as you would just expect 36 00:02:09,540 --> 00:02:10,600 to be. 37 00:02:10,800 --> 00:02:25,180 So for example if I said a hundred times two plus 50 divided by two and put those together I get 225 38 00:02:25,200 --> 00:02:25,490 . 39 00:02:25,590 --> 00:02:27,390 So order of operations is followed. 40 00:02:27,390 --> 00:02:33,120 Meaning I'm going to do 100 times to first to get 200 than 50 divided by two. 41 00:02:33,120 --> 00:02:41,520 Since division is the next one up which is 25 and then 200 plus 25 is 225 if I want to actually specify 42 00:02:41,550 --> 00:02:44,780 particular orders of operations I can use parentheses. 43 00:02:44,970 --> 00:02:50,610 So for example I could say something like 100 times and with parentheses designate that I wanted to 44 00:02:50,610 --> 00:02:58,210 actually add 2 plus 50 first and then divide right to accepter. 45 00:02:58,470 --> 00:03:01,610 OK so everything's working probably as you would expect it to. 46 00:03:01,620 --> 00:03:03,840 Just basic arithmetic. 47 00:03:04,110 --> 00:03:11,040 The last operation I want to show is the motter modular operation which basically just returns the remainder 48 00:03:11,040 --> 00:03:12,470 of a division. 49 00:03:12,480 --> 00:03:18,720 So for example if I say five divided by two I want to get two point five. 50 00:03:18,840 --> 00:03:24,570 So that means that two times two is four and I have a remainder of 1 right. 51 00:03:24,570 --> 00:03:29,040 So by about about 2 is 2.5 if I actually want to get the remainder. 52 00:03:29,040 --> 00:03:35,680 I can use the modulo operation which in R is two sets of percentage signs. 53 00:03:36,270 --> 00:03:39,890 So that can be read as 5 2 and the remainder is 1. 54 00:03:39,900 --> 00:03:43,370 And all this is doing is just returning in the remainder of a division. 55 00:03:43,740 --> 00:03:56,250 So for example if I say 10 maade something like 8 I'll get two since a can only go into 10 once with 56 00:03:56,250 --> 00:03:57,710 a remainder of two. 57 00:03:57,960 --> 00:04:00,080 Since eight plus two is equal to 10. 58 00:04:00,120 --> 00:04:04,230 So that's just going to give you the remainder in a division. 59 00:04:04,230 --> 00:04:09,630 This is really useful later on for checking if numbers are even or odd or third divisible by a certain 60 00:04:09,630 --> 00:04:10,300 number. 61 00:04:10,300 --> 00:04:11,160 Cetera. 62 00:04:11,280 --> 00:04:11,860 OK. 63 00:04:12,060 --> 00:04:14,130 Hopefully those are all pretty straightforward. 64 00:04:14,130 --> 00:04:18,390 You can just review this lecture or the notes for this lecture in case you ever want to reference what 65 00:04:18,390 --> 00:04:21,190 the actual symbols or operations are for arithmetic. 66 00:04:21,500 --> 00:04:27,740 OK that's it in the next lecture We'll talk about some basic data types in here. 67 00:04:27,750 --> 00:04:29,410 Thanks everyone and I'll see you at the next lecture 6693

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.