Displaying 4 results from an estimated 4 matches for "mnew".
Did you mean:
knew
2011 Dec 22
1
Union/Intersect two continuous sets
Dear All,
It is my first time using this mail list to post a question. And I
sincerely hope that this will not bother any subscribers.
So far as I know, there are functions like union( ), which can help to
combine two sets of discrete data. But what if the data sets are with
continuous data. For instance, I got three sets like [2, 4], [5, 6], [3.4,
5.5]. I wonder if there is a quick solution to
2013 Sep 23
0
Correlate rows of 2 matrices
Hi,
You may try:
set.seed(49)
m1 = matrix(rnorm(30), nrow = 3)
m2 = matrix(rnorm(30), nrow = 3)
?corsP<-vector()
? for(i in 1:3) corsP[i] =? cor(m1[i,], m2[i,])
?corsP
#[1]? 0.58411274 -0.02382329? 0.03760757
diag(cor(t(m1),t(m2)))
#[1]? 0.58411274 -0.02382329? 0.03760757
#or
mNew<- rbind(m1,m2)
?indx<-rep(seq(nrow(mNew)/2),2)
?sapply(split(seq_len(nrow(mNew)),indx),function(x) cor(t(mNew[x,]),t(mNew[x,]))[2])
?#???????? 1?????????? 2?????????? 3
?#0.58411274 -0.02382329? 0.03760757
#or
tapply(seq_along(indx),list(indx),FUN=function(x) cor(t(mNew[x,]),t(mNew[x,]))[2]...
2008 Jun 21
1
converting an R function into VBA
...e new y, y=Mx
This is done iteratively until the difference between the old x and new x is less than the tolerance level.
The normalised x, i.e. (1/sqrt(sum(x^2)))*x , call this v, is the first prinicipal component and the last value of beta is the associated eigenvalue.
A new M is calculated as Mnew = M-beta*v*transpose(v)
And, the whole procedure is repeated for Mnew to get the second prinicipal component and associated eigenvalue. The is done m times.
I want to output all the eigenvectors (prinicipal components) and eigenvalues to some location in the spreadsheet.
I would be extremely gr...
2012 Jul 06
1
function on strsplit output
Hi,
I am trying to format some data (example matrix "m" below) for which each data point has 2 associated values separated by a comma.
I want to replace values <3 with "0" to give the example output below.
I have got as far as:
out<-lapply(strsplit(m,","),as.numeric)
Failed to identify anything along the lines of "[out<3]<-0" that works...
Thank