Required packages

install.packages ("readr")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/readr_1.3.1.zip'
Content type 'application/zip' length 1565258 bytes (1.5 MB)
downloaded 1.5 MB
package ‘readr’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\MEGHANA REDDY\AppData\Local\Temp\RtmpkPKDOz\downloaded_packages
install.packages ("xlsx")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/xlsx_0.6.3.zip'
Content type 'application/zip' length 379952 bytes (371 KB)
downloaded 371 KB
package ‘xlsx’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\MEGHANA REDDY\AppData\Local\Temp\RtmpkPKDOz\downloaded_packages
install.packages ("readxl")
Error in install.packages : Updating loaded packages
install.packages ("foreign")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
Warning in install.packages :
  package ‘foreign’ is not available (for R version 3.6.3)
install.packages ("gdata")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/gdata_2.18.0.zip'
Content type 'application/zip' length 1264605 bytes (1.2 MB)
downloaded 1.2 MB
package ‘gdata’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\MEGHANA REDDY\AppData\Local\Temp\RtmpkPKDOz\downloaded_packages
install.packages ("rvest")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/rvest_0.3.5.zip'
Content type 'application/zip' length 664570 bytes (648 KB)
downloaded 648 KB
package ‘rvest’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\MEGHANA REDDY\AppData\Local\Temp\RtmpkPKDOz\downloaded_packages
install.packages ("dplyr")
Error in install.packages : Updating loaded packages
install.packages ("tidyr")
Error in install.packages : Updating loaded packages
install.packages ("deductive")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/deductive_0.1.3.zip'
Content type 'application/zip' length 57169 bytes (55 KB)
downloaded 55 KB
package ‘deductive’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\MEGHANA REDDY\AppData\Local\Temp\RtmpkPKDOz\downloaded_packages
install.packages ("deducorrect")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/deducorrect_1.3.7.zip'
Content type 'application/zip' length 1454150 bytes (1.4 MB)
downloaded 1.4 MB
package ‘deducorrect’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\MEGHANA REDDY\AppData\Local\Temp\RtmpkPKDOz\downloaded_packages
install.packages ("editrules")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/editrules_2.9.3.zip'
Content type 'application/zip' length 1023473 bytes (999 KB)
downloaded 999 KB
package ‘editrules’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\MEGHANA REDDY\AppData\Local\Temp\RtmpkPKDOz\downloaded_packages
install.packages ("validate")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/validate_0.9.3.zip'
Content type 'application/zip' length 1253573 bytes (1.2 MB)
downloaded 1.2 MB
package ‘validate’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\MEGHANA REDDY\AppData\Local\Temp\RtmpkPKDOz\downloaded_packages
install.packages("readxl")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
Warning in install.packages :
  package ‘readxl’ is in use and will not be installed
install.packages("dplyr")
Error in install.packages : Updating loaded packages
install.packages("tidyr")
Error in install.packages : Updating loaded packages
install.packages ("hmisc")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
Warning in install.packages :
  package ‘hmisc’ is not available (for R version 3.6.3)
Warning in install.packages :
  Perhaps you meant ‘Hmisc’ ?
install.packages ("forecast")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/forecast_8.12.zip'
Content type 'application/zip' length 2357805 bytes (2.2 MB)
downloaded 2.2 MB
package ‘forecast’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\MEGHANA REDDY\AppData\Local\Temp\RtmpkPKDOz\downloaded_packages
install.packages ("stringr")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/stringr_1.4.0.zip'
Content type 'application/zip' length 216753 bytes (211 KB)
downloaded 211 KB
package ‘stringr’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\MEGHANA REDDY\AppData\Local\Temp\RtmpkPKDOz\downloaded_packages
install.packages ("lubridate")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)

  There is a binary version available but the
  source version is later:

  Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/lubridate_1.7.8.zip'
Content type 'application/zip' length 1591936 bytes (1.5 MB)
downloaded 1.5 MB
package ‘lubridate’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\MEGHANA REDDY\AppData\Local\Temp\RtmpkPKDOz\downloaded_packages
install.packages ("car")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/car_3.0-8.zip'
Content type 'application/zip' length 1563926 bytes (1.5 MB)
downloaded 1.5 MB
package ‘car’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\MEGHANA REDDY\AppData\Local\Temp\RtmpkPKDOz\downloaded_packages
install.packages ("outliers")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/outliers_0.14.zip'
Content type 'application/zip' length 84962 bytes (82 KB)
downloaded 82 KB
package ‘outliers’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\MEGHANA REDDY\AppData\Local\Temp\RtmpkPKDOz\downloaded_packages
 install.packages ("mvn")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
Warning in install.packages :
  package ‘mvn’ is not available (for R version 3.6.3)
Warning in install.packages :
  Perhaps you meant ‘MVN’ ?
install.packages ("infotheo")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/infotheo_1.2.0.zip'
Content type 'application/zip' length 516487 bytes (504 KB)
downloaded 504 KB
package ‘infotheo’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\MEGHANA REDDY\AppData\Local\Temp\RtmpkPKDOz\downloaded_packages
install.packages ("mass")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
Warning in install.packages :
  package ‘mass’ is not available (for R version 3.6.3)
Warning in install.packages :
  Perhaps you meant ‘MASS’ ?
install.packages ("caret")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/caret_6.0-86.zip'
Content type 'application/zip' length 6259146 bytes (6.0 MB)
downloaded 6.0 MB
package ‘caret’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\MEGHANA REDDY\AppData\Local\Temp\RtmpkPKDOz\downloaded_packages
install.packages ("mlr")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/mlr_2.17.1.zip'
Content type 'application/zip' length 4868922 bytes (4.6 MB)
downloaded 4.6 MB
package ‘mlr’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\MEGHANA REDDY\AppData\Local\Temp\RtmpkPKDOz\downloaded_packages
install.packages ("ggplot2")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/ggplot2_3.3.1.zip'
Content type 'application/zip' length 4023651 bytes (3.8 MB)
downloaded 3.8 MB
package ‘ggplot2’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\MEGHANA REDDY\AppData\Local\Temp\RtmpkPKDOz\downloaded_packages
install.packages("dplyr")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into 㤼㸱C:/Users/MEGHANA REDDY/Documents/R/win-library/3.6㤼㸲
(as 㤼㸱lib㤼㸲 is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/dplyr_1.0.0.zip'
Content type 'application/zip' length 1523116 bytes (1.5 MB)
downloaded 1.5 MB
package ‘dplyr’ successfully unpacked and MD5 sums checked
Warning in install.packages :
  cannot remove prior installation of package ‘dplyr’
Warning in install.packages :
  problem copying C:\Users\MEGHANA REDDY\Documents\R\win-library\3.6\00LOCK\dplyr\libs\x64\dplyr.dll to C:\Users\MEGHANA REDDY\Documents\R\win-library\3.6\dplyr\libs\x64\dplyr.dll: Permission denied
Warning in install.packages :
  restored ‘dplyr’

The downloaded binary packages are in
    C:\Users\MEGHANA REDDY\AppData\Local\Temp\RtmpkPKDOz\downloaded_packages
install.packages("tidyr")
Error in install.packages : Updating loaded packages
install.packages ("knitr")
Error in install.packages : Updating loaded packages

Executive Summary

Preprocessing is the process where the raw data is made in an understable form.The steps take to preprocessthe data were:firstly the data was imported, then checked out the missing values, the variable type. The untidy data was converted into tidy data, the values were scanned for further process.

Data

The data types was taken from https://data.worldbank.org/indicator/SH.MED.BEDS.ZSA and discover.data.vic.gov.au.The first data is data the about hospital beds in hospitlas for patients in Australia (per 1000 patients) , this data is untidy data,the variable in this data are years 1960 to 2019 and hospital beds.The other data was about the response rate of ambulance and the data is tidy, the variable in this data are UCL Name,FinalDispatch Code, %<=15mins, AVG RT - Seconds,Total Number.

library(readxl)
View(HSP_BEDS)
View(RESPONSE_RATE)
class(HSP_BEDS)
[1] "tbl_df"     "tbl"        "data.frame"
class(RESPONSE_RATE)
[1] "tbl_df"     "tbl"        "data.frame"
head(HSP_BEDS)
head(RESPONSE_RATE)
factor(HSP_BEDS)
                                                                                                                                                                                                                                                                                                                                                                       YEARS 
   c(1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2008, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019) 
                                                                                                                                                                                                                                                                                                                                                                        BEDS 
c(11.19999981, 11.3, 11.4, 11.7, 11.80000019, 11.89999962, 11.80000019, 11.80000019, 11.69999981, 11.69999981, 11.60000038, 11.8, 11.8, 12, 11.9, 11.9, 12.1, 12.1, 12.2, 12.3, 12.2, 12.1, 11.9, 11.7, 10.9, NA, 10.5, NA, 9.8, NA, 9.2, 8.9, 8.9, 8.7, 8.7, 8.5, 8.3, 8.2, 7.9, 7.8, 7.6, 4, NA, 3.9, 4, 3.97, NA, NA, 3.8, 3.9, 3.8, NA, NA, 3.8, NA, NA, 4.6, NA, 3, NA) 
2 Levels: c(1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2008, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019) ...

Understand

Here we get to know thw variable type and class of the variables in the data set.Here years,beds, AVG RT Seconds,less than 15mins abd Total Number varicbles are numberic class and UCL NAME and Finak Dispatch Code are character class.

# This is the R chunk for the Understand Section
colnames(HSP_BEDS) <-c("YEARS","BEDS")
class(HSP_BEDS $YEARS)
[1] "numeric"
typeof(HSP_BEDS $YEARS)
[1] "double"
class(HSP_BEDS $BEDS)
[1] "numeric"
typeof(HSP_BEDS $BEDS)
[1] "double"
class (RESPONSE_RATE $ `UCL Name`)
[1] "character"
class(RESPONSE_RATE $`Final Dispatch Code`)
[1] "character"
class(RESPONSE_RATE $`less than15mins`)
[1] "numeric"
class(RESPONSE_RATE  $`AVG RT - Seconds`)
[1] "numeric"
class(RESPONSE_RATE $`Total Number`)
[1] "numeric"
typeof (RESPONSE_RATE $ `UCL Name`)
[1] "character"
typeof(RESPONSE_RATE $`Final Dispatch Code`)
[1] "character"
typeof(RESPONSE_RATE $`less than15mins`)
[1] "double"
typeof(RESPONSE_RATE  $`AVG RT - Seconds`)
[1] "double"
typeof(RESPONSE_RATE $`Total Number`)
[1] "double"

Tidy & Manipulate Data I

The tidy principle doesnt coform because the data is tidy and only has missing valves and special values only.

gather(RESPONSE_RATE)
gather(HSP_BEDS)

Tidy & Manipulate Data II

Here one variable eas mutated wih the other.

bind_rows(HSP_BEDS, RESPONSE_RATE)
bind_cols(HSP_BEDS, RESPONSE_RATE) 
RESPONSE_RATE %>%leftjoin(years)'

Scan I

Here I have scanned the data to find the missing values and special values in the data.After the data has been scanned I got few missing values in hsp bed data and no misisng values in the response rate data.The missing values are omitted from the data.

is.na(HSP_BEDS)
      YEARS  BEDS
 [1,] FALSE FALSE
 [2,] FALSE FALSE
 [3,] FALSE FALSE
 [4,] FALSE FALSE
 [5,] FALSE FALSE
 [6,] FALSE FALSE
 [7,] FALSE FALSE
 [8,] FALSE FALSE
 [9,] FALSE FALSE
[10,] FALSE FALSE
[11,] FALSE FALSE
[12,] FALSE FALSE
[13,] FALSE FALSE
[14,] FALSE FALSE
[15,] FALSE FALSE
[16,] FALSE FALSE
[17,] FALSE FALSE
[18,] FALSE FALSE
[19,] FALSE FALSE
[20,] FALSE FALSE
[21,] FALSE FALSE
[22,] FALSE FALSE
[23,] FALSE FALSE
[24,] FALSE FALSE
[25,] FALSE FALSE
[26,] FALSE  TRUE
[27,] FALSE FALSE
[28,] FALSE  TRUE
[29,] FALSE FALSE
[30,] FALSE  TRUE
[31,] FALSE FALSE
[32,] FALSE FALSE
[33,] FALSE FALSE
[34,] FALSE FALSE
[35,] FALSE FALSE
[36,] FALSE FALSE
[37,] FALSE FALSE
[38,] FALSE FALSE
[39,] FALSE FALSE
[40,] FALSE FALSE
[41,] FALSE FALSE
[42,] FALSE FALSE
[43,] FALSE  TRUE
[44,] FALSE FALSE
[45,] FALSE FALSE
[46,] FALSE FALSE
[47,] FALSE  TRUE
[48,] FALSE  TRUE
[49,] FALSE FALSE
[50,] FALSE FALSE
[51,] FALSE FALSE
[52,] FALSE  TRUE
[53,] FALSE  TRUE
[54,] FALSE FALSE
[55,] FALSE  TRUE
[56,] FALSE  TRUE
[57,] FALSE FALSE
[58,] FALSE  TRUE
[59,] FALSE FALSE
[60,] FALSE  TRUE
is.na(RESPONSE_RATE)
      UCL Name Final Dispatch Code less than15mins
 [1,]    FALSE               FALSE           FALSE
 [2,]    FALSE               FALSE           FALSE
 [3,]    FALSE               FALSE           FALSE
 [4,]    FALSE               FALSE           FALSE
 [5,]    FALSE               FALSE           FALSE
 [6,]    FALSE               FALSE           FALSE
 [7,]    FALSE               FALSE           FALSE
 [8,]    FALSE               FALSE           FALSE
 [9,]    FALSE               FALSE           FALSE
[10,]    FALSE               FALSE           FALSE
[11,]    FALSE               FALSE           FALSE
[12,]    FALSE               FALSE           FALSE
[13,]    FALSE               FALSE           FALSE
[14,]    FALSE               FALSE           FALSE
[15,]    FALSE               FALSE           FALSE
[16,]    FALSE               FALSE           FALSE
[17,]    FALSE               FALSE           FALSE
[18,]    FALSE               FALSE           FALSE
[19,]    FALSE               FALSE           FALSE
[20,]    FALSE               FALSE           FALSE
[21,]    FALSE               FALSE           FALSE
[22,]    FALSE               FALSE           FALSE
[23,]    FALSE               FALSE           FALSE
[24,]    FALSE               FALSE           FALSE
[25,]    FALSE               FALSE           FALSE
[26,]    FALSE               FALSE           FALSE
[27,]    FALSE               FALSE           FALSE
[28,]    FALSE               FALSE           FALSE
[29,]    FALSE               FALSE           FALSE
[30,]    FALSE               FALSE           FALSE
[31,]    FALSE               FALSE           FALSE
[32,]    FALSE               FALSE           FALSE
[33,]    FALSE               FALSE           FALSE
[34,]    FALSE               FALSE           FALSE
[35,]    FALSE               FALSE           FALSE
[36,]    FALSE               FALSE           FALSE
[37,]    FALSE               FALSE           FALSE
[38,]    FALSE               FALSE           FALSE
[39,]    FALSE               FALSE           FALSE
[40,]

Scan II

Here I have scanned the data to find the outliners.The variable beds has maximum number of possible outliners and years have less outliners.

boxplot(HSP_BEDS)
boxplot(RESPONSE_RATE)

Transform

Here the variable was tranformed to histogram.

ln_HSP_BEDS <- log(YEARS $YEARS)
hist(years)
LS0tDQp0aXRsZTogIk1BVEgyMzQ5IFNlbWVzdGVyIDEsIDIwMjAiDQphdXRob3I6ICJNZ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