These computer games were written by Marek Hlavac [personal website], currently a doctoral student at Harvard University.
My adaptation of the classic paper and pencil guessing game [wikipedia]:
The game consists of two files: an .R source file, and an .Rdata database of words to be guessed, and their categories.
You can download the two files separately here:
Alternatively, you can download [this .zip archive], which contains both files.
new.game() begins a new game of hangman
guess(x) guesses a letter 'x' from the alphabet, e.g.: guess("b")
Note: When you run the .R file, please make sure your working directory contains hangman.Rdata. You can do this by using R's setwd() command.