21 Jul 17:20 2016

### Calculation with R

Steven Stoline <sstoline <at> gmail.com>

2016-07-21 15:20:07 GMT

2016-07-21 15:20:07 GMT

Dear All: good morning I do need your help how to do the following calculation: Assume we have a matrix 13x2 (say). Two columns named dataval and index dataval index 20 1 11 0 34 0 54 1 76 1 76 0 61 1 88 1 91 0 11 0 23 1 45 1 53 0 data<-matrix(c(20,11,34,54,76,76,61,88,91,11,23,45,53,1,0,0,1,1,0,1,1,0,0,1,1,0),13,2) data I need to perform the calculation: for a = 7 (say) sum((data[ ,1] - a)^2)(Continue reading)