Guest User

Untitled

a guest
Apr 22nd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. set.seed(12)
  2. tmp <- rnorm(100, mean = 100, sd = 1)
  3. set.seed(12)
  4. outliers <- rnorm(10, mean = (1.5 * summary(tmp)[["3rd Qu."]]), sd = 1)
  5. ## Bind the columns together
  6. dat <- data.frame(cbind(c(tmp, outliers),
  7. c(rep("Expected", each = length(tmp)),
  8. rep("Outlier", each = length(outliers)))))
  9. ## Add Column Names
  10. colnames(dat) <- c("Units", "Category")
  11.  
  12. ## Convert ECL values to numeric
  13. dat$Units <- as.numeric(as.character(dat$Units))
Add Comment
Please, Sign In to add comment