To run the program, type the following command:
% ./naiveBayesClassifier.R spamLabelled.dat spamUnlabelled.dat
Note: I have made the script executable, therefore the command above should work. However just in case something went astray (the script become unexecutable), please use the following command to make the script executable first:
% chmod +x naiveBayesClassifier.R
And then run the program using the first command.