﻿1
00:00:01,540 --> 00:00:11,590
‫Now let us learn how to create a histogram in our Instagram in R is created using a command at USD est.

2
00:00:12,300 --> 00:00:14,100
‫Let us look at the customer data once again

3
00:00:16,910 --> 00:00:18,550
‫in this data.

4
00:00:18,550 --> 00:00:21,900
‫The Age variable as numeric values.

5
00:00:21,900 --> 00:00:29,460
‫If you want to see the distribution of this age variable or different age categories you want to first

6
00:00:29,460 --> 00:00:33,710
‫create the categories of this age and against each category.

7
00:00:33,750 --> 00:00:39,110
‫You want to get the count of customers who belong to that category.

8
00:00:39,120 --> 00:00:42,540
‫Instagram is the blog which gives us this value.

9
00:00:42,540 --> 00:00:43,650
‫Same as bad blog.

10
00:00:43,680 --> 00:00:50,580
‫The height of the bars in a histogram will give us the frequency of each category coming in our data.

11
00:00:52,260 --> 00:00:54,260
‫So let us create the histogram for this.

12
00:00:54,720 --> 00:01:04,170
‫Each variable we will write history and within bracket specify these very well so it belongs to customer

13
00:01:04,170 --> 00:01:04,560
‫data

14
00:01:07,390 --> 00:01:14,520
‫dollar and intellect age but underscore mine.

15
00:01:14,940 --> 00:01:19,630
‫Instagram comes on the bottom side.

16
00:01:20,610 --> 00:01:27,630
‫It gives us the frequency of each category of age which art has created on its own.

17
00:01:27,630 --> 00:01:36,380
‫It has created eleven bucket by default and assigned the frequency to each category.

18
00:01:36,390 --> 00:01:43,320
‫Now if you want to create a different bucket so if you want only five bucket you can change this by

19
00:01:43,380 --> 00:01:55,770
‫using the barometer called breaks to within Instagram will again mention customer dollar age karma

20
00:01:58,900 --> 00:02:03,100
‫Biggs is equal to fame

21
00:02:08,940 --> 00:02:17,640
‫you can see this has now six bars we told it to have five but so the number five that we gave it is

22
00:02:17,640 --> 00:02:19,010
‫a suggestive number.

23
00:02:19,050 --> 00:02:25,650
‫It does not chart that out will create only five bars I can create more than five or less than five

24
00:02:25,650 --> 00:02:26,580
‫bars also.

25
00:02:26,580 --> 00:02:28,990
‫So in that case it has created six bars.

26
00:02:29,220 --> 00:02:37,050
‫But if you want around five bars you have suggested using the breaks parameter.

27
00:02:37,090 --> 00:02:41,310
‫There are other ways of suggesting the categories.

28
00:02:41,310 --> 00:02:50,250
‫So if you do not want it to start from 10 and have a word of 10 to 20 then 230 you can give the weight

29
00:02:50,310 --> 00:02:55,450
‫of these categories to specify the words we will rate.

30
00:02:55,770 --> 00:02:57,600
‫Let us copy paste command.

31
00:03:00,180 --> 00:03:07,590
‫And after breaks we will see and within bracket we will write these values.

32
00:03:07,590 --> 00:03:18,580
‫So we wanted to be from zero to 40 40 to 60 and 60 200.

33
00:03:18,630 --> 00:03:27,600
‫So basically I am categorizing my customers or belong to young middle aged and aged customers.

34
00:03:27,600 --> 00:03:31,720
‫So these three categories will be created divide on this.

35
00:03:32,060 --> 00:03:38,240
‫So now we have zero to 40 40 to 60 60 two hundred.

36
00:03:38,250 --> 00:03:46,040
‫Notice that when we ran this command out has automatically taken the frequency identity on the different

37
00:03:46,050 --> 00:03:55,020
‫side which means if you take out the area of this chart it will give you the frequency of customers

38
00:03:55,020 --> 00:03:57,730
‫belonging to each category.

39
00:03:57,810 --> 00:03:59,520
‫We do not want it to be like this.

40
00:03:59,820 --> 00:04:06,090
‫So we will need another parameter which is what frequency and which we write as if on cue

41
00:04:09,450 --> 00:04:10,060
‫is equal good.

42
00:04:10,170 --> 00:04:10,570
‫True.

43
00:04:11,730 --> 00:04:13,810
‫So this will give us frequencies only.

44
00:04:13,890 --> 00:04:22,760
‫Now you can see most of the customers belong to 0 to 40 age group and least belong to 60 200 age group.

45
00:04:23,160 --> 00:04:30,630
‫Again as we discussed in bar plot you can change the color of this distribution although you can copy

46
00:04:30,630 --> 00:04:37,080
‫paste this line and will add the parameter of color which is.

47
00:04:37,080 --> 00:04:37,650
‫See you.

48
00:04:37,660 --> 00:04:37,950
‫L

49
00:04:42,160 --> 00:04:45,580
‫is equal to let's call it blue

50
00:04:51,180 --> 00:04:53,050
‫and this command.

51
00:04:53,080 --> 00:04:55,410
‫You can see this now has blue color.

52
00:04:57,600 --> 00:05:05,100
‫If you want to change the name of this chart you can use the main parameter too.

53
00:05:05,470 --> 00:05:10,880
‫Right now it has a heading which just took it out of customer dollar age.

54
00:05:10,920 --> 00:05:14,040
‫That is the variable that we had.

55
00:05:14,040 --> 00:05:20,020
‫You may not want this in a presentation to the histogram of age.

56
00:05:20,520 --> 00:05:25,550
‫If we'd done this the main heading is updated.

57
00:05:25,590 --> 00:05:32,970
‫We can also change the x label for this Instagram just in the same way we discussed what about plot

58
00:05:33,450 --> 00:05:36,060
‫the parameters for this will be X Lab.

59
00:05:36,120 --> 00:05:38,660
‫We are not doing this.

60
00:05:39,300 --> 00:05:46,980
‫Once this Instagram is created you can export this into an image file or I believe and use it in your

61
00:05:47,400 --> 00:05:49,110
‫presentation to do that.

62
00:05:49,110 --> 00:05:56,310
‫There is this export option in our studio or you can revisit debug laws selected in that we told you

63
00:05:56,310 --> 00:05:59,420
‫the command to run to create a BMG file.

