-
Notifications
You must be signed in to change notification settings - Fork 0
/
RCodeConsoleOutput.rtf
137 lines (137 loc) · 4.51 KB
/
RCodeConsoleOutput.rtf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl276\slmult1\qc\lang9\b\f0\fs22 Data Output from R Code Execution Console\par
\pard\sa200\sl276\slmult1\b0\par
CountryCode = 1\par
> CountryType = "A"\par
> Country = "AA"\par
> Year = 1\par
> Period = 1\par
> PeriodInDate = 01/01/2000\par
> Flow = "X"\par
> CommodityGroupCode = 1\par
> CommodityGroup = "Total"\par
> CountryImportCode = 1\par
> CountryImport = "AA"\par
> Value = 1\par
> EstimationType = "C"\par
> EstimationTypeDesc = "Calculate"\par
> UNT <- data.frame(read.csv("C:\\\\R\\\\UNcommExportsFoodAllRegionsTotals.csv", header = T))\par
> MNEXPORTS1 <- mean(UNT$Value)\par
> MNEXPORTS1\par
[1] 11337579167\par
> MDEXPORTS1 <- median(UNT$Value)\par
> MDEXPORTS1\par
[1] 61294565\par
> MOEXPORTS1 <- mode(UNT$Value)\par
> MOEXPORTS1\par
[1] "numeric"\par
> SDEXPORTS1 <- sd(UNT$Value)\par
> SDEXPORTS1\par
[1] 120933207942\par
> VREXPORTS1 <- var(UNT$Value)\par
> VREXPORTS1\par
[1] 1.462484e+22\par
> MIEXPORTS1 <- min(UNT$Value)\par
> MIEXPORTS1\par
[1] 0.5921984\par
> MXEXPORTS1 <- max(UNT$Value)\par
> MXEXPORTS1\par
[1] 4.374494e+12\par
> RAEXPORTS1 <- range(UNT$Value)\par
> RAEXPORTS1\par
[1] 5.921984e-01 4.374494e+12\par
> QAEXPORTS1 <- quantile(UNT$Value)\par
> QAEXPORTS1\par
0% 25% 50% 75% 100% \par
5.921984e-01 2.848852e+06 6.129456e+07 8.830495e+08 4.374494e+12 \par
> SUMEXPORTS2 <- sum(UND2U$Value)\par
Error in Summary.factor(c(793L, 556L, 444L, 379L, 366L, 320L, 319L, 298L, : \par
\lquote sum\rquote not meaningful for factors\par
> UND2U <- data.frame(read.csv("C:\\\\R\\\\UNcommExportsFoodAllRegionsDev2UndevTotals.csv", header = T))\par
> UNU2D <- data.frame(read.csv("C:\\\\R\\\\UNcommExportsFoodAllRegionsUndev2DevTotals.csv", header = T))\par
> MNEXPORTS2 <- mean(UND2U$Value)\par
> MNEXPORTS2\par
[1] 8052767198\par
> MDEXPORTS2 <- median(UND2U$Value)\par
> MDEXPORTS2\par
[1] 184030219\par
> MOEXPORTS2 <- mode(UND2U$Value)\par
> MOEXPORTS2\par
[1] "numeric"\par
> SDEXPORTS2 <- sd(UND2U$Value)\par
> SDEXPORTS2\par
[1] 40482213971\par
> VREXPORTS2 <- var(UND2U$Value)\par
> VREXPORTS2\par
[1] 1.63881e+21\par
> MIEXPORTS2 <- min(UND2U$Value)\par
> MIEXPORTS2\par
[1] 13.35561\par
> MXEXPORTS2 <- max(UND2U$Value)\par
> MXEXPORTS2\par
[1] 795260876005\par
> RAEXPORTS2 <- range(UND2U$Value)\par
> RAEXPORTS2\par
[1] 1.335561e+01 7.952609e+11\par
> QAEXPORTS2 <- quantile(UND2U$Value)\par
> QAEXPORTS2\par
0% 25% 50% 75% 100% \par
1.335561e+01 1.232165e+07 1.840302e+08 1.757540e+09 7.952609e+11 \par
> SUMEXPORTS2 <- sum(UND2U$Value)\par
> SUMEXPORTS2\par
[1] 7.118646e+12\par
> SUMEXPORTS1 <- sum(UNT$Value)\par
> SUMEXPORTS1\par
[1] 5.248165e+13\par
> MNEXPORTS3 <- mean(UNU2D$Value)\par
> MNEXPORTS3\par
[1] 38353943139\par
> MDEXPORTS3 <- median(UNU2D$Value)\par
> MDEXPORTS3\par
[1] 6014943743\par
> MOEXPORTS3 <- mode(UNU2D$Value)\par
> MOEXPORTS3\par
[1] "numeric"\par
> SDEXPORTS3 <- sd(UNU2D$Value)\par
> SDEXPORTS3\par
[1] 70075666837\par
> VREXPORTS3 <- var(UNU2D$Value)\par
> VREXPORTS3\par
[1] 4.910599e+21\par
> MIEXPORTS3 <- min(UNU2D$Value)\par
> MIEXPORTS3\par
[1] 10958\par
> MXEXPORTS3 <- max(UNU2D$Value)\par
> MXEXPORTS3\par
[1] 380444650647\par
> RAEXPORTS3 <- range(UNU2D$Value)\par
> RAEXPORTS3\par
[1] 10958 380444650647\par
> QAEXPORTS3 <- quantile(UNU2D$Value)\par
> QAEXPORTS3\par
0% 25% 50% 75% 100% \par
10958 1015759398 6014943743 32930983837 380444650647 \par
> SUMEXPORTS3 <- sum(UNU2D$Value)\par
> SUMEXPORTS3\par
[1] 6.251693e+12\par
> t.test(UND2U$Value,UNU2D$Value)\par
\par
Welch Two Sample t-test\par
\par
data: UND2U$Value and UNU2D$Value\par
t = -5.3582, df = 182.42, p-value = 2.514e-07\par
alternative hypothesis: true difference in means is not equal to 0\par
95 percent confidence interval:\par
-41459003198 -19143348684\par
sample estimates:\par
mean of x mean of y \par
8052767198 38353943139 \par
\par
> write.table(x=UNT,file="C:\\\\R\\\\Module8R_outputUNTotals.txt",sep="|",na="XOKMX",quote=FALSE,row.names=FALSE)\par
> write.table(x=UND2U,file="C:\\\\R\\\\Module8R_outputUNDevs.txt",sep="|",na="XOKMX",quote=FALSE,row.names=FALSE)\par
> write.table(x=UNU2D,file="C:\\\\R\\\\Module8R_outputUNUndevs.txt",sep="|",na="XOKMX",quote=FALSE,row.names=FALSE)\par
> \par
\par
\par
}