Advertisement
Guest User

Untitled

a guest
Jul 31st, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. # Map 1-based optional input ports to variables
  2. dataset1 <- maml.mapInputPort(1) # class: data.frame
  3.  
  4. # Sample operation
  5. dataset1$AgeGroup <- ifelse(dataset1$Age < 16, "Young", ifelse(dataset1$Age > 60, "Old", "Middle"))
  6.  
  7. # Select data.frame to be sent to the output Dataset port
  8. maml.mapOutputPort("dataset1");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement