R code fro hw1

Hi,
Here a R code to run the perceptron (hw1).
If you think it could be useful, please add this code to your repo, and add me as a contributor.

Fred