Guest User

Untitled

a guest
Jan 23rd, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. > fail <- factor(c(2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1,
  2. 1, 2, 1, 1, 1, 1, 1),
  3. levels = 1:2, labels = c("no", "yes"))
  4.  
  5. > temperature <- c(53, 57, 58, 63, 66, 67, 67, 67, 68, 69, 70, 70,
  6. 70, 70, 72, 73, 75, 75, 76, 76, 78, 79, 81)
  7. > cdplot(fail ~ temperature)
  8.  
  9. > which(temperature == 67)
  10. 6 7 8
  11.  
  12. > which(temperature == 67 & fail == 1)
  13. integer(0)
  14.  
  15. > which(temperature == 67 & fail == "no")
  16. [1] 6 7 8
  17.  
  18. prop.table(table(temperature, fail),1)
Add Comment
Please, Sign In to add comment