﻿1
00:00:00,940 --> 00:00:05,300
‫So now let us learn how to install packages in r first.

2
00:00:05,370 --> 00:00:14,110
‫What is a package packages in R is what libraries are in other programming languages packages is basically

3
00:00:14,110 --> 00:00:19,480
‫a collection of code that other people have written and that gives some additional functions to our

4
00:00:19,480 --> 00:00:28,040
‫program the availability of numerous packages for r makes R one of the most powerful data things programming

5
00:00:28,040 --> 00:00:36,470
‫languages for example there is a package called DG plot DG plot package is used to create different

6
00:00:36,470 --> 00:00:44,040
‫types of graphs plot charts for our data so that we can visualize our data in a better way.

7
00:00:44,840 --> 00:00:52,240
‫To let us learn how to install packages in that you can also see that in the right bottom window this

8
00:00:52,240 --> 00:00:57,450
‫window about which we have not talked about till now there is a tab.

9
00:00:57,740 --> 00:00:58,870
‫Title packages

10
00:01:01,780 --> 00:01:08,320
‫you can see these are the inbuilt packages which are already installed with R.

11
00:01:08,470 --> 00:01:09,460
‫You can scroll down

12
00:01:12,460 --> 00:01:15,180
‫on the left of the name of these packages.

13
00:01:15,190 --> 00:01:22,630
‫There is a checkbox all of these are unchanged which means all these packages are installed but they

14
00:01:22,630 --> 00:01:24,220
‫are not loaded.

15
00:01:24,400 --> 00:01:29,930
‫You cannot use them in your code to use a package.

16
00:01:30,000 --> 00:01:32,750
‫You will have to loaded to loaded.

17
00:01:32,770 --> 00:01:37,210
‫You can just simply take the check box.

18
00:01:37,420 --> 00:01:44,490
‫You can see a code is run in the console and that particular package has been loaded.

19
00:01:44,500 --> 00:01:47,380
‫Now you can use DG plot while writing the code.

20
00:01:50,470 --> 00:01:53,080
‫But these are only the in big packages.

21
00:01:53,080 --> 00:01:58,460
‫You may want to install a package which is not in big.

22
00:01:58,780 --> 00:02:06,370
‫I am writing here some of the Web you added where you can see a whole list of packages available with

23
00:02:06,470 --> 00:02:09,600
‫R so written here.

24
00:02:09,610 --> 00:02:18,700
‫These three links if you brought all these links in the first link you can find the packages are clubbed

25
00:02:18,790 --> 00:02:25,270
‫by their use case all the packages which help in plotting and graphing.

26
00:02:25,330 --> 00:02:31,630
‫I'll put in one group for pre processing the data all the packages available at Club then put in one

27
00:02:31,630 --> 00:02:32,160
‫group.

28
00:02:32,560 --> 00:02:36,570
‫So the first link will give you packages club and two groups.

29
00:02:36,610 --> 00:02:43,450
‫The second link will give you packages in the alphabetical order by their names to so it will list all

30
00:02:43,450 --> 00:02:45,760
‫the packages in R by their names.

31
00:02:45,760 --> 00:02:47,820
‫It's a huge list.

32
00:02:47,870 --> 00:02:53,390
‫The third one is another website where people to make the packages which can be used by other people.

33
00:02:54,200 --> 00:02:57,300
‫So it's a huge community you can find numerous packages there.

34
00:02:57,310 --> 00:03:07,300
‫Also to browse the Ural through out window you can use browse you all command so will raid browse your

35
00:03:07,300 --> 00:03:08,500
‫role.

36
00:03:08,790 --> 00:03:16,950
‫So when we start typing browse since it is an inbuilt command our studio prompts us the all the commands

37
00:03:17,100 --> 00:03:19,530
‫which start with browse.

38
00:03:19,530 --> 00:03:22,500
‫You can navigate using up and down key.

39
00:03:22,500 --> 00:03:26,340
‫Select the one that you want and prestige tab key.

40
00:03:26,340 --> 00:03:33,180
‫This will autocomplete that of the command for you within this within this decade.

41
00:03:33,250 --> 00:03:38,890
‫We need to enter the URL will first have double quotation marks.

42
00:03:38,980 --> 00:03:46,810
‫Will copy the mural and pasted here and will run this command.

43
00:03:46,840 --> 00:03:50,350
‫You can see that website is opened up in the default browser.

44
00:03:51,830 --> 00:03:59,160
‫And here you can see the packages are clubbed topic leaves so if you want did you upload it is in the

45
00:03:59,200 --> 00:04:00,080
‫graphics.

46
00:04:00,280 --> 00:04:04,710
‫Topic you can explore this on your own.

47
00:04:04,710 --> 00:04:08,250
‫If you are interested in some particular package go ahead and install it.

48
00:04:09,250 --> 00:04:12,180
‫So now let us learn how to install a package.

49
00:04:12,240 --> 00:04:13,470
‫There are two ways.

50
00:04:13,590 --> 00:04:16,660
‫One is the way provided by our studio.

51
00:04:16,920 --> 00:04:22,940
‫It is you go to the tools in the menu bar we didn't do it.

52
00:04:22,950 --> 00:04:31,470
‫There is an option of install package here if we want to install package from the repository of crime.

53
00:04:31,510 --> 00:04:35,370
‫You just write the name of the package here and it will install it.

54
00:04:35,370 --> 00:04:40,990
‫It was downloaded from decline Qur'an repository and installed if you want to do it from some other

55
00:04:41,020 --> 00:04:48,410
‫website you can change the install from option hit.

56
00:04:48,500 --> 00:04:51,270
‫So this is one way I'll show you the second way.

57
00:04:51,320 --> 00:04:59,620
‫And I suggest that we use the secondary the second ways by using this script as click cancel here in

58
00:04:59,620 --> 00:05:01,330
‫the left script window.

59
00:05:01,510 --> 00:05:04,500
‫We'll write a script to install package y.

60
00:05:04,510 --> 00:05:11,830
‫I suggest this is because when you are sharing your code with someone else that someone else should

61
00:05:11,830 --> 00:05:15,220
‫also install the package which is required by your code.

62
00:05:15,910 --> 00:05:21,130
‫If you have not written it in the script the other person will not come to know which package you have

63
00:05:21,130 --> 00:05:22,180
‫installed.

64
00:05:22,180 --> 00:05:26,370
‫If you just go to Tools and install a package it will not be part of the script.

65
00:05:26,560 --> 00:05:32,030
‫So it is better that you write the code to install package in the script.

66
00:05:32,050 --> 00:05:37,730
‫If you are only going to use the analysis then you can go ahead and use these tools option also.

67
00:05:39,080 --> 00:05:46,130
‫So let us install a package which is a relevant and declined repository will write install not packages

68
00:05:51,910 --> 00:05:53,070
‫within this bracket.

69
00:05:53,080 --> 00:06:00,610
‫We need to give the name of the package and within double quotation marks will write lib linear

70
00:06:05,570 --> 00:06:06,080
‫labeling.

71
00:06:06,080 --> 00:06:14,070
‫Here is a package which is used to do linear regression analysis so will press control enter

72
00:06:17,050 --> 00:06:25,840
‫you can see the control was giving a warning because as I told you r is a case sensitive language and

73
00:06:26,320 --> 00:06:29,860
‫I entered capital L instead of small.

74
00:06:30,100 --> 00:06:34,090
‫So let's correct this and on it.

75
00:06:37,250 --> 00:06:46,240
‫So it is automatically downloading from grand and once it is downloaded it has installed here and the

76
00:06:46,360 --> 00:06:47,340
‫side window also.

77
00:06:47,410 --> 00:06:52,500
‫You can see lib linear is available and the description is altered it in here.

78
00:06:52,540 --> 00:06:57,790
‫Linear predictive models can be built using the celebrity.

79
00:06:57,870 --> 00:06:59,930
‫Now this package is a start again.

80
00:06:59,940 --> 00:07:09,620
‫It is not loaded to see the list of all the installed packages will right library open and close a bracket

81
00:07:11,290 --> 00:07:14,910
‫to libraries where all the packages are stored.

82
00:07:15,400 --> 00:07:21,100
‫So when I run this command it will give the list of all the packages installed.

83
00:07:21,490 --> 00:07:33,820
‫You can see this is the list of packages installed and a smaller description enclosed just add.

84
00:07:34,000 --> 00:07:41,130
‫And if you want to see the list of currently loaded packages will rate search open and close bracket.

85
00:07:45,100 --> 00:07:46,330
‫If you run the search command

86
00:07:49,290 --> 00:07:56,530
‫this is the list of packages that are currently loaded and which you can use to load up package which

87
00:07:56,530 --> 00:08:08,020
‫is installed will use a required keyword so all right come on require and relate labeling it with a

88
00:08:08,050 --> 00:08:09,430
‫double quotation marks.

89
00:08:09,550 --> 00:08:09,720
‫So

90
00:08:13,020 --> 00:08:13,780
‫let's go.

91
00:08:13,860 --> 00:08:15,190
‫Double quotation marks.

92
00:08:19,070 --> 00:08:26,930
‫So you see earlier when we ran the search command labeling it was not available.

93
00:08:26,940 --> 00:08:34,070
‫Now if you run it again the second one is labeling it and as it is available you can also see in the

94
00:08:34,070 --> 00:08:37,280
‫date window labeling it now has a tag

95
00:08:40,750 --> 00:08:41,220
‫to remove.

96
00:08:41,220 --> 00:08:52,180
‫You can simply unpick the package or you can write detach the EPA page within double quotation marks

97
00:08:52,900 --> 00:08:54,970
‫package colon

98
00:08:58,300 --> 00:08:59,020
‫labeling it

99
00:09:05,490 --> 00:09:07,630
‫comma and load is equal to

100
00:09:11,750 --> 00:09:13,580
‫is equal to to

101
00:09:17,040 --> 00:09:20,000
‫control enter.

102
00:09:20,130 --> 00:09:23,960
‫Now you can see that take is removed from labeling it.

103
00:09:24,410 --> 00:09:32,310
‫Now to uninstall this package we will use remove packages command the will rate remove Dodd packages

104
00:09:33,180 --> 00:09:36,890
‫within bracket we will rate within double quotation marks.

105
00:09:36,930 --> 00:09:39,270
‫The name of this package lib linear

106
00:09:42,610 --> 00:09:46,880
‫control center and that package is removed.

107
00:09:46,900 --> 00:09:53,400
‫You'll not be able to find it in the user library to know more about any package.

108
00:09:53,400 --> 00:09:56,610
‫You can type question mark and then write the name of the package

109
00:10:00,220 --> 00:10:00,720
‫so I write.

110
00:10:00,730 --> 00:10:04,180
‫Did you plot to run this command.

111
00:10:04,270 --> 00:10:12,490
‫You can see in the right window there is a help tab that help guide has all the documentation all standard

112
00:10:12,550 --> 00:10:20,230
‫packages commands everything whenever you want to know about any standard command or package.

113
00:10:20,230 --> 00:10:22,000
‫Just a question mark.

114
00:10:22,010 --> 00:10:26,580
‫Command name odd package name and you'll get all the information about it.

115
00:10:29,590 --> 00:10:33,070
‫So this is how we install a package.

116
00:10:33,190 --> 00:10:41,490
‫Make it available by loading it uninstall it or make it unavailable by detecting it.

117
00:10:41,530 --> 00:10:49,440
‫This is all about packages in the next video we'll look at some inbuilt datasets of odd outcomes with

118
00:10:49,440 --> 00:10:50,580
‫some in big data set.

119
00:10:50,670 --> 00:10:52,280
‫We look at some of those data.

