output: pdf_document: default html_document: default
The goal of JUN is to provides functionality for CS599 Project.
You can install the released version of JUN from CRAN with:
install.packages("https://github.com/jr2339/JUN")
This is a basic example which shows you how to solve a common problem:
library(JUN)
## basic KMEANS example code
KMEANS(data = as.matrix(iris[,1:4]), k =3)
##The example result of KEMANS is
$cluster
[1] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 3 1 3 1 3 3
[58] 3 1 3 3 3 3 3 3 3 3 3 3 3 3 3 1 3 3 3 1 1 3 3 3 3 3 1 3 3 1 3 3 3 3 3 3 3 3 3 3 3 3 3 1 1 1 1 1 1 3 1 1 1 1 1 1 [115] 3 1 1 1 1 1 1 3 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1
$tot.withinss
[1] 84.07368
$betweenss
[1] 597.2969
## basic hierarchical clustering example code
HCLUST(data = as.matrix(iris[,1:4]))
##The example result of KEMANS is
$merge
[,1] [,2]
[1,] -143 -102
[2,] -40 -8
[3,] -18 -1
[4,] -35 -10
[5,] -133 -129
[6,] -49 -11
[7,] -41 3
[8,] -38 -5
[9,] -22 -20
[10,] 7 8
[11,] -31 -30
[12,] -94 -58
[13,] -82 -81
[14,] -138 -117
[15,] -39 -9
[16,] -47 9
[17,] 2 10
[18,] -50 17
[19,] -2 4
[20,] -48 -4
[21,] -29 -28
[22,] -93 -83
[23,] -97 -96
[24,] -139 -128
[25,] -3 20
[26,] -46 19
[27,] -13 26
[28,] 18 21
[29,] 11 27
[30,] -92 -64
[31,] -76 -66
[32,] -100 23
[33,] -26 29
[34,] -70 13
[35,] -127 -124
[36,] -140 -113
[37,] 25 33
[38,] -95 32
[39,] -89 38
[40,] -85 -67
[41,] -79 30
[42,] -27 -24
[43,] -43 15
[44,] -90 -54
[45,] -98 -75
[46,] 37 43
[47,] -12 46
[48,] -7 47
[49,] -36 28
[50,] 6 49
[51,] -44 42
[52,] -74 41
[53,] -71 24
[54,] 50 51
[55,] 48 54
[56,] -148 -111
[57,] -144 -121
[58,] -149 -137
[59,] -59 31
[60,] 34 44
[61,] -55 59
[62,] -68 22
[63,] -147 35
[64,] 16 55
[65,] -104 14
[66,] -145 -141
[67,] -14 64
[68,] -146 -142
[69,] 53 63
[70,] 39 62
[71,] -88 -69
[72,] 45 61
[73,] -114 1
[74,] -53 -51
[75,] -91 70
[76,] 60 75
[77,] -57 -52
[78,] -131 -108
[79,] 57 66
[80,] -123 -106
[81,] -150 69
[82,] -32 -21
[83,] -87 74
[84,] -25 67
[85,] -125 79
[86,] -37 84
[87,] 82 86
[88,] -62 76
[89,] -116 58
[90,] -105 5
[91,] -56 40
[92,] 72 77
[93,] -122 73
[94,] 88 91
[95,] 83 92
[96,] -78 95
[97,] -77 96
[98,] 52 94
[99,] -134 -84
[100,] -19 -6
[101,] 81 93
[102,] -72 97
[103,] 65 90
[104,] -112 56
[105,] 36 85
[106,] 87 100
[107,] -17 106
[108,] 98 102
[109,] -33 107
[110,] -34 109
[111,] -130 -126
[112,] -80 108
[113,] -73 99
[114,] -45 110
[115,] 103 104
[116,] -61 12
[117,] 101 113
[118,] 68 115
[119,] 105 118
[120,] -16 114
[121,] 89 119
[122,] -86 112
[123,] 117 121
[124,] -99 116
[125,] -60 122
[126,] -103 111
[127,] 123 126
[128,] -119 80
[129,] -15 120
[130,] -132 -118
[131,] 125 127
[132,] -65 131
[133,] -101 132
[134,] -120 133
[135,] 78 134
[136,] -23 129
[137,] -115 135
[138,] -63 137
[139,] 71 138
[140,] 128 139
[141,] -136 140
[142,] -135 141
[143,] -109 142
[144,] -42 136
[145,] -110 143
[146,] 124 145
[147,] -107 146
[148,] 130 147
[149,] 144 148
$height
[1] 0.0000000 0.1000000 0.1000000 0.1000000 0.1000000 0.1000000 0.1414214 0.1414214 0.1414214 0.1414214 0.1414214
[12] 0.1414214 0.1414214 0.1414214 0.1414214 0.1414214 0.1414214 0.1414214 0.1414214 0.1414214 0.1414214 0.1414214
[23] 0.1414214 0.1414214 0.1414214 0.1414214 0.1414214 0.1414214 0.1414214 0.1414214 0.1414214 0.1414214 0.1732051
[34] 0.1732051 0.1732051 0.1732051 0.1732051 0.1732051 0.1732051 0.2000000 0.2000000 0.2000000 0.2000000 0.2000000
[45] 0.2000000 0.2236068 0.2236068 0.2236068 0.2236068 0.2236068 0.2236068 0.2236068 0.2236068 0.2236068 0.2236068
[56] 0.2236068 0.2236068 0.2449490 0.2449490 0.2449490 0.2449490 0.2449490 0.2449490 0.2449490 0.2449490 0.2449490
[67] 0.2449490 0.2449490 0.2449490 0.2645751 0.2645751 0.2645751 0.2645751 0.2645751 0.2645751 0.2645751 0.2645751
[78] 0.2645751 0.2645751 0.2645751 0.2828427 0.2828427 0.2828427 0.3000000 0.3000000 0.3000000 0.3000000 0.3000000
[89] 0.3000000 0.3000000 0.3000000 0.3162278 0.3162278 0.3162278 0.3162278 0.3162278 0.3162278 0.3316625 0.3316625
[100] 0.3316625 0.3316625 0.3316625 0.3316625 0.3464102 0.3464102 0.3464102 0.3464102 0.3464102 0.3464102 0.3464102
[111] 0.3464102 0.3464102 0.3605551 0.3605551 0.3605551 0.3605551 0.3605551 0.3605551 0.3605551 0.3605551 0.3741657
[122] 0.3741657 0.3741657 0.3872983 0.3872983 0.3872983 0.4000000 0.4123106 0.4123106 0.4123106 0.4123106 0.4242641
[133] 0.4242641 0.4358899 0.4358899 0.4582576 0.4898979 0.4898979 0.5099020 0.5291503 0.5385165 0.5385165 0.5567764
[144] 0.6244998 0.6324555 0.6480741 0.7348469 0.8185353 1.6401219
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.