Skip to content

Instantly share code, notes, and snippets.

@monogenea
Created October 7, 2019 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monogenea/19901e83ee87eea7b75db78178be61f2 to your computer and use it in GitHub Desktop.
Save monogenea/19901e83ee87eea7b75db78178be61f2 to your computer and use it in GitHub Desktop.
wineOutlier <- wine
wineOutlier[10,] <- wineOutlier[10,]*10 # change the 10th obs. into an extreme one by multiplying its profile by 10
outlierPCA <- prcomp(scale(wineOutlier[,-1]))
plot(outlierPCA$x[,1:2], col = wineClasses)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment