R Markdown

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:

`wisc_bc_data(in)` <- read.csv("C:/Users/singleton1097/Downloads/wisc_bc_data(in).csv")
View(`wisc_bc_data(in)`)
WBC<-`wisc_bc_data(in)`
dim(WBC)
## [1] 569  32
head(WBC)
##         id diagnosis radius_mean texture_mean perimeter_mean area_mean
## 1   842302         M       17.99        10.38         122.80    1001.0
## 2   842517         M       20.57        17.77         132.90    1326.0
## 3 84300903         M       19.69        21.25         130.00    1203.0
## 4 84348301         M       11.42        20.38          77.58     386.1
## 5 84358402         M       20.29        14.34         135.10    1297.0
## 6   843786         M       12.45        15.70          82.57     477.1
##   smoothness_mean compactness_mean concavity_mean concave.points_mean
## 1         0.11840          0.27760         0.3001             0.14710
## 2         0.08474          0.07864         0.0869             0.07017
## 3         0.10960          0.15990         0.1974             0.12790
## 4         0.14250          0.28390         0.2414             0.10520
## 5         0.10030          0.13280         0.1980             0.10430
## 6         0.12780          0.17000         0.1578             0.08089
##   symmetry_mean fractal_dimension_mean radius_se texture_se perimeter_se
## 1        0.2419                0.07871    1.0950     0.9053        8.589
## 2        0.1812                0.05667    0.5435     0.7339        3.398
## 3        0.2069                0.05999    0.7456     0.7869        4.585
## 4        0.2597                0.09744    0.4956     1.1560        3.445
## 5        0.1809                0.05883    0.7572     0.7813        5.438
## 6        0.2087                0.07613    0.3345     0.8902        2.217
##   area_se smoothness_se compactness_se concavity_se concave.points_se
## 1  153.40      0.006399        0.04904      0.05373           0.01587
## 2   74.08      0.005225        0.01308      0.01860           0.01340
## 3   94.03      0.006150        0.04006      0.03832           0.02058
## 4   27.23      0.009110        0.07458      0.05661           0.01867
## 5   94.44      0.011490        0.02461      0.05688           0.01885
## 6   27.19      0.007510        0.03345      0.03672           0.01137
##   symmetry_se fractal_dimension_se radius_worst texture_worst perimeter_worst
## 1     0.03003             0.006193        25.38         17.33          184.60
## 2     0.01389             0.003532        24.99         23.41          158.80
## 3     0.02250             0.004571        23.57         25.53          152.50
## 4     0.05963             0.009208        14.91         26.50           98.87
## 5     0.01756             0.005115        22.54         16.67          152.20
## 6     0.02165             0.005082        15.47         23.75          103.40
##   area_worst smoothness_worst compactness_worst concavity_worst
## 1     2019.0           0.1622            0.6656          0.7119
## 2     1956.0           0.1238            0.1866          0.2416
## 3     1709.0           0.1444            0.4245          0.4504
## 4      567.7           0.2098            0.8663          0.6869
## 5     1575.0           0.1374            0.2050          0.4000
## 6      741.6           0.1791            0.5249          0.5355
##   concave.points_worst symmetry_worst fractal_dimension_worst
## 1               0.2654         0.4601                 0.11890
## 2               0.1860         0.2750                 0.08902
## 3               0.2430         0.3613                 0.08758
## 4               0.2575         0.6638                 0.17300
## 5               0.1625         0.2364                 0.07678
## 6               0.1741         0.3985                 0.12440
str(WBC)
## 'data.frame':    569 obs. of  32 variables:
##  $ id                     : int  842302 842517 84300903 84348301 84358402 843786 844359 84458202 844981 84501001 ...
##  $ diagnosis              : chr  "M" "M" "M" "M" ...
##  $ radius_mean            : num  18 20.6 19.7 11.4 20.3 ...
##  $ texture_mean           : num  10.4 17.8 21.2 20.4 14.3 ...
##  $ perimeter_mean         : num  122.8 132.9 130 77.6 135.1 ...
##  $ area_mean              : num  1001 1326 1203 386 1297 ...
##  $ smoothness_mean        : num  0.1184 0.0847 0.1096 0.1425 0.1003 ...
##  $ compactness_mean       : num  0.2776 0.0786 0.1599 0.2839 0.1328 ...
##  $ concavity_mean         : num  0.3001 0.0869 0.1974 0.2414 0.198 ...
##  $ concave.points_mean    : num  0.1471 0.0702 0.1279 0.1052 0.1043 ...
##  $ symmetry_mean          : num  0.242 0.181 0.207 0.26 0.181 ...
##  $ fractal_dimension_mean : num  0.0787 0.0567 0.06 0.0974 0.0588 ...
##  $ radius_se              : num  1.095 0.543 0.746 0.496 0.757 ...
##  $ texture_se             : num  0.905 0.734 0.787 1.156 0.781 ...
##  $ perimeter_se           : num  8.59 3.4 4.58 3.44 5.44 ...
##  $ area_se                : num  153.4 74.1 94 27.2 94.4 ...
##  $ smoothness_se          : num  0.0064 0.00522 0.00615 0.00911 0.01149 ...
##  $ compactness_se         : num  0.049 0.0131 0.0401 0.0746 0.0246 ...
##  $ concavity_se           : num  0.0537 0.0186 0.0383 0.0566 0.0569 ...
##  $ concave.points_se      : num  0.0159 0.0134 0.0206 0.0187 0.0188 ...
##  $ symmetry_se            : num  0.03 0.0139 0.0225 0.0596 0.0176 ...
##  $ fractal_dimension_se   : num  0.00619 0.00353 0.00457 0.00921 0.00511 ...
##  $ radius_worst           : num  25.4 25 23.6 14.9 22.5 ...
##  $ texture_worst          : num  17.3 23.4 25.5 26.5 16.7 ...
##  $ perimeter_worst        : num  184.6 158.8 152.5 98.9 152.2 ...
##  $ area_worst             : num  2019 1956 1709 568 1575 ...
##  $ smoothness_worst       : num  0.162 0.124 0.144 0.21 0.137 ...
##  $ compactness_worst      : num  0.666 0.187 0.424 0.866 0.205 ...
##  $ concavity_worst        : num  0.712 0.242 0.45 0.687 0.4 ...
##  $ concave.points_worst   : num  0.265 0.186 0.243 0.258 0.163 ...
##  $ symmetry_worst         : num  0.46 0.275 0.361 0.664 0.236 ...
##  $ fractal_dimension_worst: num  0.1189 0.089 0.0876 0.173 0.0768 ...
WBC1<-WBC[-1]
dim(WBC1)
## [1] 569  31
str(WBC1)
## 'data.frame':    569 obs. of  31 variables:
##  $ diagnosis              : chr  "M" "M" "M" "M" ...
##  $ radius_mean            : num  18 20.6 19.7 11.4 20.3 ...
##  $ texture_mean           : num  10.4 17.8 21.2 20.4 14.3 ...
##  $ perimeter_mean         : num  122.8 132.9 130 77.6 135.1 ...
##  $ area_mean              : num  1001 1326 1203 386 1297 ...
##  $ smoothness_mean        : num  0.1184 0.0847 0.1096 0.1425 0.1003 ...
##  $ compactness_mean       : num  0.2776 0.0786 0.1599 0.2839 0.1328 ...
##  $ concavity_mean         : num  0.3001 0.0869 0.1974 0.2414 0.198 ...
##  $ concave.points_mean    : num  0.1471 0.0702 0.1279 0.1052 0.1043 ...
##  $ symmetry_mean          : num  0.242 0.181 0.207 0.26 0.181 ...
##  $ fractal_dimension_mean : num  0.0787 0.0567 0.06 0.0974 0.0588 ...
##  $ radius_se              : num  1.095 0.543 0.746 0.496 0.757 ...
##  $ texture_se             : num  0.905 0.734 0.787 1.156 0.781 ...
##  $ perimeter_se           : num  8.59 3.4 4.58 3.44 5.44 ...
##  $ area_se                : num  153.4 74.1 94 27.2 94.4 ...
##  $ smoothness_se          : num  0.0064 0.00522 0.00615 0.00911 0.01149 ...
##  $ compactness_se         : num  0.049 0.0131 0.0401 0.0746 0.0246 ...
##  $ concavity_se           : num  0.0537 0.0186 0.0383 0.0566 0.0569 ...
##  $ concave.points_se      : num  0.0159 0.0134 0.0206 0.0187 0.0188 ...
##  $ symmetry_se            : num  0.03 0.0139 0.0225 0.0596 0.0176 ...
##  $ fractal_dimension_se   : num  0.00619 0.00353 0.00457 0.00921 0.00511 ...
##  $ radius_worst           : num  25.4 25 23.6 14.9 22.5 ...
##  $ texture_worst          : num  17.3 23.4 25.5 26.5 16.7 ...
##  $ perimeter_worst        : num  184.6 158.8 152.5 98.9 152.2 ...
##  $ area_worst             : num  2019 1956 1709 568 1575 ...
##  $ smoothness_worst       : num  0.162 0.124 0.144 0.21 0.137 ...
##  $ compactness_worst      : num  0.666 0.187 0.424 0.866 0.205 ...
##  $ concavity_worst        : num  0.712 0.242 0.45 0.687 0.4 ...
##  $ concave.points_worst   : num  0.265 0.186 0.243 0.258 0.163 ...
##  $ symmetry_worst         : num  0.46 0.275 0.361 0.664 0.236 ...
##  $ fractal_dimension_worst: num  0.1189 0.089 0.0876 0.173 0.0768 ...
table(WBC1$diagnosis)
## 
##   B   M 
## 357 212
WBC1$diagnosis <- factor(WBC1$diagnosis, level = c("B", "M"), labels = c("Benign", "Malignant"))
table(WBC1$diagnosis)
## 
##    Benign Malignant 
##       357       212
round(prop.table(table(WBC1$diagnosis)))
## 
##    Benign Malignant 
##         1         0
round(prop.table(table(WBC1$diagnosis))*100, digits = 1)
## 
##    Benign Malignant 
##      62.7      37.3
summary(WBC1[c("radius_mean", "area_mean", "smoothness_mean")])
##   radius_mean       area_mean      smoothness_mean  
##  Min.   : 6.981   Min.   : 143.5   Min.   :0.05263  
##  1st Qu.:11.700   1st Qu.: 420.3   1st Qu.:0.08637  
##  Median :13.370   Median : 551.1   Median :0.09587  
##  Mean   :14.127   Mean   : 654.9   Mean   :0.09636  
##  3rd Qu.:15.780   3rd Qu.: 782.7   3rd Qu.:0.10530  
##  Max.   :28.110   Max.   :2501.0   Max.   :0.16340
normalize<-function(x){}
normalize<-function(x){ return ((x - min(x)) / (max(x) - min(x)))}
normalize(c(1,2,3,4,5))
## [1] 0.00 0.25 0.50 0.75 1.00
normalize(c(10,20,30,40,50))
## [1] 0.00 0.25 0.50 0.75 1.00
wbc_N<-as.data.frame( lapply(WBC1[2:31], normalize))
head(wbc_N)
##   radius_mean texture_mean perimeter_mean area_mean smoothness_mean
## 1   0.5210374    0.0226581      0.5459885 0.3637328       0.5937528
## 2   0.6431445    0.2725736      0.6157833 0.5015907       0.2898799
## 3   0.6014956    0.3902604      0.5957432 0.4494168       0.5143089
## 4   0.2100904    0.3608387      0.2335015 0.1029056       0.8113208
## 5   0.6298926    0.1565776      0.6309861 0.4892895       0.4303512
## 6   0.2588386    0.2025702      0.2679842 0.1415058       0.6786133
##   compactness_mean concavity_mean concave.points_mean symmetry_mean
## 1        0.7920373      0.7031396           0.7311133     0.6863636
## 2        0.1817680      0.2036082           0.3487575     0.3797980
## 3        0.4310165      0.4625117           0.6356859     0.5095960
## 4        0.8113613      0.5656045           0.5228628     0.7762626
## 5        0.3478928      0.4639175           0.5183897     0.3782828
## 6        0.4619962      0.3697282           0.4020378     0.5186869
##   fractal_dimension_mean  radius_se texture_se perimeter_se    area_se
## 1              0.6055181 0.35614702 0.12046941   0.36903360 0.27381126
## 2              0.1413227 0.15643672 0.08258929   0.12444047 0.12565979
## 3              0.2112468 0.22962158 0.09430251   0.18037035 0.16292179
## 4              1.0000000 0.13909107 0.17587518   0.12665504 0.03815479
## 5              0.1868155 0.23382220 0.09306489   0.22056260 0.16368757
## 6              0.5511794 0.08075321 0.11713225   0.06879329 0.03808008
##   smoothness_se compactness_se concavity_se concave.points_se symmetry_se
## 1     0.1592956     0.35139844   0.13568182         0.3006251  0.31164518
## 2     0.1193867     0.08132304   0.04696970         0.2538360  0.08453875
## 3     0.1508312     0.28395470   0.09676768         0.3898466  0.20569032
## 4     0.2514532     0.54321507   0.14295455         0.3536655  0.72814769
## 5     0.3323588     0.16791841   0.14363636         0.3570752  0.13617943
## 6     0.1970629     0.23431069   0.09272727         0.2153817  0.19372995
##   fractal_dimension_se radius_worst texture_worst perimeter_worst area_worst
## 1            0.1830424    0.6207755     0.1415245       0.6683102 0.45069799
## 2            0.0911101    0.6069015     0.3035714       0.5398177 0.43521431
## 3            0.1270055    0.5563856     0.3600746       0.5084417 0.37450845
## 4            0.2872048    0.2483102     0.3859275       0.2413467 0.09400806
## 5            0.1457996    0.5197439     0.1239339       0.5069476 0.34157491
## 6            0.1446596    0.2682319     0.3126333       0.2639076 0.13674794
##   smoothness_worst compactness_worst concavity_worst concave.points_worst
## 1        0.6011358         0.6192916       0.5686102            0.9120275
## 2        0.3475533         0.1545634       0.1929712            0.6391753
## 3        0.4835898         0.3853751       0.3597444            0.8350515
## 4        0.9154725         0.8140117       0.5486422            0.8848797
## 5        0.4373638         0.1724151       0.3194888            0.5584192
## 6        0.7127386         0.4827837       0.4277157            0.5982818
##   symmetry_worst fractal_dimension_worst
## 1      0.5984624               0.4188640
## 2      0.2335896               0.2228781
## 3      0.4037059               0.2134330
## 4      1.0000000               0.7737111
## 5      0.1575005               0.1425948
## 6      0.4770353               0.4549390
wbcd_train <- wbc_N[1:469, ]
wbcd_test <- wbc_N[470:569, ]
wbcd_train_labels<-wbc_N[1:469, 1]
wbcd_test_labels<-WBC1[470:569, 1]

library(class)
## Warning: package 'class' was built under R version 4.4.3
wbcd_test_pred <- knn(train = wbcd_train, test = wbcd_test, cl = wbcd_train_labels, k=21)
wbcd_test_pred
##   [1] 0.202991149604809  0.214823228737754  0.226182024705381 
##   [4] 0.38851815040939   0.385678451417483  0.203937715935444 
##   [7] 0.218609494060296  0.266884376922713  0.319892091438308 
##  [10] 0.214823228737754  0.416441857163141  0.228075157366653 
##  [13] 0.29764778266837   0.193052203133135  0.325098206256803 
##  [16] 0.379525770268352  0.36248757631691   0.378105920772398 
##  [19] 0.587770363008188  0.223815608878792  0.280609588716929 
##  [22] 0.226182024705381  0.378105920772398  0.6067016896209   
##  [25] 0.287235553031379  0.31279284395854   0.378105920772398 
##  [28] 0.309006578635998  0.247006483979365  0.587770363008188 
##  [31] 0.587770363008188  0.288655402527332  0.187846088314639 
##  [34] 0.225708741540063  0.607174972786218  0.176487292347011 
##  [37] 0.204410999100762  0.239907236499598  0.119409342609683 
##  [40] 0.372899805953902  0.372899805953902  0.165601779544702 
##  [43] 0.29764778266837   0.307586729140045  0.372899805953902 
##  [46] 0.333617303232524  0.137015476359506  0.587770363008188 
##  [49] 0.499739694259075  0.27824317289034   0.273510341237162 
##  [52] 0.202991149604809  0.77093094798618   0.234701121681102 
##  [55] 0.27824317289034   0.218609494060296  0.137015476359506 
##  [58] 0.27824317289034   0.298121065833688  0.38425860192153  
##  [61] 0.197311751620995  0.27824317289034   0.273510341237162 
##  [64] 0.315159259785129  0.587770363008188  0.187372805149321 
##  [67] 0.587770363008188  0.313739410289176  0.253632448293814 
##  [70] 0.116191017085522  0.232334705854513  0.214823228737754 
##  [73] 0.352075346679919  0.305693596478773  0.13128875005916  
##  [76] 0.234227838515784  0.308060012305362  0.240380519664916 
##  [79] 0.137015476359506  0.178380425008282  0.25031946613659  
##  [82] 0.226182024705381  0.278716456055658  0.361541009986275 
##  [85] 0.166075062710019  0.246059917648729  0.253632448293814 
##  [88] 0.166075062710019  0.20062473377822   0.352075346679919 
##  [91] 0.237067537507691  0.308060012305362  0.1443040371054   
##  [94] 0.19399876946377   0.863221165223153  0.711297269156136 
##  [97] 0.593923044157319  0.37763263760708   0.603388707463676 
## [100] 0.0575039045861139
## 385 Levels: 0 0.0575039045861139 0.0585924558663448 ... 1
library(gmodels)
## Warning: package 'gmodels' was built under R version 4.4.3
CrossTable(x = wbcd_test_labels, y = wbcd_test_pred, prop.chisq = FALSE)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  100 
## 
##  
##                  | wbcd_test_pred 
## wbcd_test_labels | 0.0575039045861139 |  0.116191017085522 |  0.119409342609683 |   0.13128875005916 |  0.137015476359506 |    0.1443040371054 |  0.165601779544702 |  0.166075062710019 |  0.176487292347011 |  0.178380425008282 |  0.187372805149321 |  0.187846088314639 |  0.193052203133135 |   0.19399876946377 |  0.197311751620995 |   0.20062473377822 |  0.202991149604809 |  0.203937715935444 |  0.204410999100762 |  0.214823228737754 |  0.218609494060296 |  0.223815608878792 |  0.225708741540063 |  0.226182024705381 |  0.228075157366653 |  0.232334705854513 |  0.234227838515784 |  0.234701121681102 |  0.237067537507691 |  0.239907236499598 |  0.240380519664916 |  0.246059917648729 |  0.247006483979365 |   0.25031946613659 |  0.253632448293814 |  0.266884376922713 |  0.273510341237162 |   0.27824317289034 |  0.278716456055658 |  0.280609588716929 |  0.287235553031379 |  0.288655402527332 |   0.29764778266837 |  0.298121065833688 |  0.305693596478773 |  0.307586729140045 |  0.308060012305362 |  0.309006578635998 |   0.31279284395854 |  0.313739410289176 |  0.315159259785129 |  0.319892091438308 |  0.325098206256803 |  0.333617303232524 |  0.352075346679919 |  0.361541009986275 |   0.36248757631691 |  0.372899805953902 |   0.37763263760708 |  0.378105920772398 |  0.379525770268352 |   0.38425860192153 |  0.385678451417483 |   0.38851815040939 |  0.416441857163141 |  0.499739694259075 |  0.587770363008188 |  0.593923044157319 |  0.603388707463676 |    0.6067016896209 |  0.607174972786218 |  0.711297269156136 |   0.77093094798618 |  0.863221165223153 |          Row Total | 
## -----------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|
##           Benign |                  1 |                  1 |                  1 |                  1 |                  3 |                  1 |                  1 |                  2 |                  1 |                  1 |                  1 |                  0 |                  1 |                  0 |                  1 |                  1 |                  2 |                  1 |                  1 |                  3 |                  2 |                  1 |                  1 |                  3 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                  2 |                  1 |                  2 |                  4 |                  1 |                  0 |                  1 |                  1 |                  2 |                  1 |                  1 |                  0 |                  2 |                  1 |                  1 |                  0 |                  1 |                  1 |                  1 |                  0 |                  2 |                  1 |                  1 |                  2 |                  0 |                  3 |                  1 |                  1 |                  1 |                  1 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                 77 | 
##                  |              0.013 |              0.013 |              0.013 |              0.013 |              0.039 |              0.013 |              0.013 |              0.026 |              0.013 |              0.013 |              0.013 |              0.000 |              0.013 |              0.000 |              0.013 |              0.013 |              0.026 |              0.013 |              0.013 |              0.039 |              0.026 |              0.013 |              0.013 |              0.039 |              0.013 |              0.013 |              0.013 |              0.013 |              0.013 |              0.013 |              0.013 |              0.013 |              0.013 |              0.013 |              0.026 |              0.013 |              0.026 |              0.052 |              0.013 |              0.000 |              0.013 |              0.013 |              0.026 |              0.013 |              0.013 |              0.000 |              0.026 |              0.013 |              0.013 |              0.000 |              0.013 |              0.013 |              0.013 |              0.000 |              0.026 |              0.013 |              0.013 |              0.026 |              0.000 |              0.039 |              0.013 |              0.013 |              0.013 |              0.013 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.770 | 
##                  |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              0.000 |              1.000 |              0.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              0.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              0.000 |              1.000 |              1.000 |              1.000 |              0.000 |              1.000 |              1.000 |              1.000 |              0.000 |              1.000 |              1.000 |              1.000 |              0.667 |              0.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |                    | 
##                  |              0.010 |              0.010 |              0.010 |              0.010 |              0.030 |              0.010 |              0.010 |              0.020 |              0.010 |              0.010 |              0.010 |              0.000 |              0.010 |              0.000 |              0.010 |              0.010 |              0.020 |              0.010 |              0.010 |              0.030 |              0.020 |              0.010 |              0.010 |              0.030 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.020 |              0.010 |              0.020 |              0.040 |              0.010 |              0.000 |              0.010 |              0.010 |              0.020 |              0.010 |              0.010 |              0.000 |              0.020 |              0.010 |              0.010 |              0.000 |              0.010 |              0.010 |              0.010 |              0.000 |              0.020 |              0.010 |              0.010 |              0.020 |              0.000 |              0.030 |              0.010 |              0.010 |              0.010 |              0.010 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |                    | 
## -----------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|
##        Malignant |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  1 |                  0 |                  1 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  1 |                  0 |                  0 |                  0 |                  0 |                  0 |                  1 |                  0 |                  0 |                  0 |                  1 |                  0 |                  0 |                  0 |                  1 |                  0 |                  0 |                  0 |                  1 |                  1 |                  0 |                  0 |                  0 |                  0 |                  0 |                  1 |                  1 |                  6 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                 23 | 
##                  |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.043 |              0.000 |              0.043 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.043 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.043 |              0.000 |              0.000 |              0.000 |              0.043 |              0.000 |              0.000 |              0.000 |              0.043 |              0.000 |              0.000 |              0.000 |              0.043 |              0.043 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.043 |              0.043 |              0.261 |              0.043 |              0.043 |              0.043 |              0.043 |              0.043 |              0.043 |              0.043 |              0.230 | 
##                  |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              1.000 |              0.000 |              1.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              1.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              1.000 |              0.000 |              0.000 |              0.000 |              1.000 |              0.000 |              0.000 |              0.000 |              1.000 |              0.000 |              0.000 |              0.000 |              0.333 |              1.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |              1.000 |                    | 
##                  |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.010 |              0.000 |              0.010 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.010 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.010 |              0.000 |              0.000 |              0.000 |              0.010 |              0.000 |              0.000 |              0.000 |              0.010 |              0.000 |              0.000 |              0.000 |              0.010 |              0.010 |              0.000 |              0.000 |              0.000 |              0.000 |              0.000 |              0.010 |              0.010 |              0.060 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |                    | 
## -----------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|
##     Column Total |                  1 |                  1 |                  1 |                  1 |                  3 |                  1 |                  1 |                  2 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                  2 |                  1 |                  1 |                  3 |                  2 |                  1 |                  1 |                  3 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                  2 |                  1 |                  2 |                  4 |                  1 |                  1 |                  1 |                  1 |                  2 |                  1 |                  1 |                  1 |                  2 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                  2 |                  1 |                  1 |                  3 |                  1 |                  3 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                  6 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                  1 |                100 | 
##                  |              0.010 |              0.010 |              0.010 |              0.010 |              0.030 |              0.010 |              0.010 |              0.020 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.020 |              0.010 |              0.010 |              0.030 |              0.020 |              0.010 |              0.010 |              0.030 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.020 |              0.010 |              0.020 |              0.040 |              0.010 |              0.010 |              0.010 |              0.010 |              0.020 |              0.010 |              0.010 |              0.010 |              0.020 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.020 |              0.010 |              0.010 |              0.030 |              0.010 |              0.030 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.060 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |              0.010 |                    | 
## -----------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|
## 
## 

Including Plots

You can also embed plots, for example:

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.