The perceptron function in R