Advertisement
Guest User

Untitled

a guest
Oct 5th, 2018
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. cf <- function(score,P50,P75){
  2. if (score<P50) {
  3. return(3)
  4. } else if (score>=P50 & score<P75) {
  5. return(2)
  6. } else {
  7. return(1)
  8. }
  9. }
  10.  
  11.  
  12. classp <- NULL
  13. for (i in 1:dim(pdata)[1]) {
  14. classp[i] <- cf(score=pdata$平均成績[i], P50 = pdata$P50[i],P75 = pdata$P75[i])
  15. }
  16. classp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement