can any one help me to now , what is the result of this code ? #start edw<-function(mm,n){ v2<-v3<-0 d<-dim(mm) dd<-d[1]*d[2] p1<-2*n/(dd*(dd-n)) p2<-(n*(n-1)*(dd-n)+2*n*(dd-d[1]-d[2]-n+2))/(dd-d[1]-d[2]+1)*(dd-n) v1<-((dd-n-1)/(n+1))*sum(mm^2) c1<-(dd^2*p1)/(n+1)^2-1 c2<-(dd^2*p2)/(n+1)^2-1 for(i in 1:d[1]){ for(j in 1:d[2]){ f1<-c(mm[i,-j],as.matrix(t(mm[-i,j]))) f2<-mm[-i,-j] a<-sum(c2*f2*mm[i,j]) b<-sum(c1*f1*mm[i,j]) v2<-v2+a v3<-v3+b } } v<-(v1+v2+v3)/dd^2 } #end thanks .
Ehs <ehsazh <at> gmail.com> writes:> > can any one help me to now , what is the result of this code ? > > #start > edw<-function(mm,n){ > v2<-v3<-0 > d<-dim(mm)several lines removed....> } > #endFollowing generic world-wide-wisdom, it is 42. Dieter
On Tuesday 28 October 2008 02:25:55 am Ehs wrote:> can any one help me to now , what is the result of this code ? >....> v<-(v1+v2+v3)/dd^2 > } > #endApparently "v", whatever that might be. However, without a little more information, your question is rather pointless. edw( ) is obviously a function, so it's output will be entirely dependent on the input. You should read the posting guides before sending a post to the list. JWD
Possibly Parallel Threads
- R-alpha: Latin-1 characters / Locale etc.
- Need help in addressing this error - ERROR OpenSSL::SSL::SSLError: SSL_accept returned=1 errno=0 state=SSLv3 read client certificate A: tlsv1 alert unknown ca
- Server Report [Incident: 040126-000715]
- µÚËĽ챱¾©³¯Ñô¹ú¼ÊÉÌÎñ½Ú
- How should I denormalise a data frame list of lists column?