file1<-read.csv("file1.csv")
chapter #8 “TRADE AND PAYMENTS” Tabel No. 8.2
Ma’am the following Histograms may look similar because there was no big difference between its data
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
This is a test file for graphing/Plot/Tabels.
pie(file1$X2013.14, main="pie 2013.14")
summary(file1$X2013.14)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 5.10 14.25 43.65 44.30 62.62 100.00
summary(file1$X2014.15)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 4.80 14.43 43.35 44.63 64.47 100.00
summary(file1$X2015.16)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 4.90 14.43 43.15 44.78 65.28 100.00
summary(file1$X2016.17)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 4.10 14.25 43.55 44.90 66.17 100.00
summary(file1$X2018.19)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 3.70 14.47 43.65 44.85 65.92 100.00
barplot(file1$X2013.14, main="barplot 2013.14")
pie(file1$X2013.14, file1$X2017.18, main="Table8.2 (2013-14) vs (2017-18)")
boxplot(file1$X2014.15~file1$X2015.16, main="boxplot 2014.15 vs 2015.16")
boxplot(file1$X2014.15~file1$X2015.16, main="Table8.2:Pakistan's Major Exports")
plot(file1$X2013.14, main="Scatter plot 2013.14")
plot(file1$X2013.14,file1$X2014.15, main="Table8.2 Scatter Plot 2013-14 vs 2014-15")
You can also embed plots, for example:
hist(file1$X2014.15, main="hist 2014.15")
hist(file1$X2014.15, main="Table8.2:Pakistan's Major Exports")
hist(file1$X2016.17, main="Table8.2:Pakistan's Major Exports", col='Green')
hist(file1$X2013.14, main="hist 2013.14")
hist(file1$X2018.192, main="Table8.2:Leather & Leather Manufactured", col='red')
summary(file1)
## Commodity X2013.14 X2014.15 X2015.16
## Length:6 Min. : 5.10 Min. : 4.80 Min. : 4.90
## Class :character 1st Qu.: 14.25 1st Qu.: 14.43 1st Qu.: 14.43
## Mode :character Median : 43.65 Median : 43.35 Median : 43.15
## Mean : 44.30 Mean : 44.63 Mean : 44.78
## 3rd Qu.: 62.62 3rd Qu.: 64.47 3rd Qu.: 65.28
## Max. :100.00 Max. :100.00 Max. :100.00
## X2016.17 X2017.18 X2018.19 X2018.192
## Min. : 4.10 Min. : 4.20 Min. : 3.70 Min. : 3.70
## 1st Qu.: 14.25 1st Qu.: 12.38 1st Qu.: 14.47 1st Qu.: 14.18
## Median : 43.55 Median : 44.05 Median : 43.65 Median : 43.60
## Mean : 44.90 Mean : 45.60 Mean : 44.85 Mean : 45.10
## 3rd Qu.: 66.17 3rd Qu.: 70.62 3rd Qu.: 65.92 3rd Qu.: 67.40
## Max. :100.00 Max. :100.00 Max. :100.00 Max. :100.00
## X2019.20
## Min. : 3.70
## 1st Qu.: 14.30
## Median : 43.75
## Mean : 44.87
## 3rd Qu.: 66.08
## Max. :100.00
Note that the echo = FALSE
parameter was added to the code chunk to prevent printing of the R code that generated the plot.
. . . . . ## Pakistan Economic Survey (2019-2020) chapter #8 “TRADE AND PAYMENTS” Tabel No. 8.3
This is a test file for graphing/Plot/Tabels.
file2<-read.csv("file2.csv")
boxplot(file2$GERMANY~file2$CHINA, main="Table8.3:Major Exports Markets")
pie(file2$USA, main="pie chart USA")
summary(file2$USA)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 15.7 17.0 189.2 223.4 396.4 532.8
summary(file2$CHINA)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 7.20 8.00 81.05 103.69 184.28 259.60
summary(file2$AFGHANISTAN)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 4.200 5.825 61.050 74.700 131.950 176.400
summary(file2$GERMANY)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 5.50 5.75 65.50 76.14 141.43 173.40
summary(file2$BANGLADESH)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 3.100 3.325 34.400 43.420 80.200 101.800
barplot(file2$USA, main="barplot USA")
barplot(file2$GERMANY, file2$UNITED.KINGDOM, main="Table8.3 GERMANY vs UK")
pie(file2$CHINA, main="Pie chart CHINA")
pie(file2$AFGHANISTAN, file2$BANGLADESH, main="Table8.3 AFGHANISTAN vs BANGLADESH")
boxplot(file2$U.A.E, main="boxplot UAE")
boxplot(file2$USA, main="boxplot USA")
boxplot(file2$UNITED.KINGDOM~file2$U.A.E, main="boxplot UK")
plot(file2$GERMANY, main="Scatter plot GERMANY")
plot(file2$U.A.E,file2$USA, main="Table8.3 Scatter Plot (U.A.E) vs (USA)")
hist(file2$BANGLADESH, main="hist BANGLADESH")
hist(file2$AFGHANISTAN, main="Table8.3:Major Exports Markets")
hist(file2$UNITED.KINGDOM, main="Table8.3: Histogram Major Exports Markets", col='Green')
hist(file2$USA, main="hist USA")
hist(file2$CHINA, main="Table8.3: Histogram Billion & Percentage Share", col='red')
summary(file2)
## Country USA CHINA AFGHANISTAN
## Length:10 Min. : 15.7 Min. : 7.20 Min. : 4.200
## Class :character 1st Qu.: 17.0 1st Qu.: 8.00 1st Qu.: 5.825
## Mode :character Median :189.2 Median : 81.05 Median : 61.050
## Mean :223.4 Mean :103.69 Mean : 74.700
## 3rd Qu.:396.4 3rd Qu.:184.28 3rd Qu.:131.950
## Max. :532.8 Max. :259.60 Max. :176.400
## UNITED.KINGDOM GERMANY U.A.E BANGLADESH
## Min. : 7.100 Min. : 5.50 Min. : 3.400 Min. : 3.100
## 1st Qu.: 7.325 1st Qu.: 5.75 1st Qu.: 4.025 1st Qu.: 3.325
## Median : 85.350 Median : 65.50 Median : 41.250 Median : 34.400
## Mean : 97.490 Mean : 76.14 Mean : 55.230 Mean : 43.420
## 3rd Qu.:181.750 3rd Qu.:141.43 3rd Qu.: 98.750 3rd Qu.: 80.200
## Max. :226.800 Max. :173.40 Max. :141.600 Max. :101.800
## ITALY SPAIN FRANCE All.Other
## Min. : 3.200 Min. : 4.000 Min. : 1.600 Min. : 39.70
## 1st Qu.: 3.325 1st Qu.: 4.025 1st Qu.: 1.725 1st Qu.: 40.33
## Median : 36.000 Median : 44.800 Median :20.300 Median : 450.90
## Mean : 44.380 Mean : 53.910 Mean :23.070 Mean : 535.60
## 3rd Qu.: 81.950 3rd Qu.:101.675 3rd Qu.:43.375 3rd Qu.:1017.20
## Max. :107.400 Max. :126.500 Max. :53.900 Max. :1243.80
## Total
## Min. : 100
## 1st Qu.: 100
## Median :1119
## Mean :1331
## 3rd Qu.:2482
## Max. :3128