Advertisement
Guest User

Untitled

a guest
Dec 16th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. GetScoreForFactorVariables <- function(data, discript, strings)
  2. {
  3. values <- data[, discript]
  4. scores <- 1:length(strings)
  5. names(scores) <- strings
  6. data$scores <- scores[values]
  7.  
  8. return (data)
  9. }
  10.  
  11. clientsdisp.df <- GetScoreForFactorVariables(clientsdisp.df, "type", c("DISPONENT", "OWNER"))
  12. cards.df <- GetScoreForFactorVariables(cards.df, "type", c("junior", "classic", "gold"))
  13. account.dr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement