Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Titanic Age Group
# Map 1-based optional input ports to variables
dataset1 <- maml.mapInputPort(1) # class: data.frame
# Sample operation
dataset1$AgeGroup <- ifelse(dataset1$Age < 16, "Young", ifelse(dataset1$Age > 60, "Old", "Middle"))
# Select data.frame to be sent to the output Dataset port
maml.mapOutputPort("dataset1");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.