[R] RMS equation

thanoon younis thanoon.younis80 at gmail.com
Mon Jul 7 13:03:14 CEST 2014


dear R-users
i am new on R-program so i need your help to solve the root mean square
equation  in R. i have a problem in summation (r=1:100)how can i write it
in R . i tried to write the code as below but the problem is the result
must be vector not constant number as code below.

i appreciate any help

thanks alot for all

p<-23
r<-100
x<-c(1.098,0.995, 1.078, 1.098, 1.034, 1.009, 1.070, 0.996, 1.070, 0.827,
0.651, 1.032, 0.841, 0.769, 0.860, 0.717, 0.847, 1.008, 0.833, 0.806,
0.273, 0.934, 0.321)
y<-c(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
1.0,0.7,0.7,0.8,0.8,0.7,0.7,0.6,0.6,0.8,0.8,1.0,0.3,1.0,0.3)
w<-x-y
A<-(w)^2
q<-sum(A)
z<-1/100*q
t<-sqrt(z)
t


More information about the R-help mailing list