Friday, July 1, 2016

scramble words in R for word puzzles

Use the following codes to solve some word puzzles

x = "petormcu"  #computer
x = unlist(strsplit(x, split=''))
str(x)
for( i in 1:15){
 print(  paste(sample(x), collapse = '') )
}

#todo: can check match with words from a database. 

No comments:

Post a Comment