perceptron with R