Last active
June 8, 2017 07:32
-
-
Save rosdyana/f7cb194c9e71e4cb7699e57f99326178 to your computer and use it in GitHub Desktop.
generate 5 gram
This file contains hidden or 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
require(data.table) | |
amino = c("A","R","N","D","C","Q","E","G","H","I","L","K","M","F","P","S","T","W","Y","V") | |
df_total = data.frame() | |
for(a in amino){ | |
for(b in amino){ | |
for(c in amino){ | |
for(d in amino){ | |
for(e in amino){ | |
model <- paste0(a,b,c,d,e, sep="") | |
df <- data.frame(model) | |
fwrite(df, "fifthgram.csv",sep = ",", append = T, col.names = F, row.names = F) | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment