fork download
  1. #read 1985 Auto Imports Database with arff file
  2.  
  3. library(foreign)
  4.  
  5. df <- read.arff("C:/dataset_9_autos.arff")
  6.  
  7.  
  8.  
  9. #Find the outliers
  10.  
  11. #the function takes the name of the dataset and/or variable as parameter and returns the outliers, if any were found.
  12.  
  13. outliers = function(x) {
  14.  
  15. boxplot(x, horizontal=FALSE, las=2, col = c('snow2'), cex.axis=1)
  16.  
  17. o = boxplot.stats(x)$out
  18.  
  19. return(o)
  20.  
  21. }
  22.  
  23.  
  24.  
  25. #compare all numerical variables with standarization
  26.  
  27. layout(1)
  28.  
  29. outliers(dfs)
  30.  
  31.  
  32.  
  33. #q-q plot for chi^2 distribution and normality check
  34.  
  35. library(MVN)
  36.  
  37. layout(1)
  38.  
  39. mardiaTest(dfn, cov = FALSE, qqplot = TRUE)
  40.  
  41. abline(a=0,b
Success #stdin #stdout #stderr 0.24s 60872KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Error in file(file, "r") : cannot open the connection
Calls: read.arff -> file
In addition: Warning message:
In file(file, "r") :
  cannot open file 'C:/dataset_9_autos.arff': No such file or directory
Execution halted