Last active
August 29, 2015 14:24
-
-
Save petermreid/3183e16d56555cc38f53 to your computer and use it in GitHub Desktop.
Titanic Age Group
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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