Displaying 4 results from an estimated 4 matches for "diamondash".
2010 Jan 29
5
random permuted block randomization
Hi,
I am very new to R. Just started yesterday. I have to generate a sequence of
40 random treatments using permuted block randomization with a block size of
8. Then I have to plot moving averages for the resulting sequence. I have
tried the sample function but I dont know if wht i did is right or not
> sample(c(1,1,1,1,2,2,2,2),8)
Any ideas please?
--
Ayesha Khan
MS Bioinformatics
Dept. of
2010 May 27
2
clustering in R
i have a matrix with the following dimensions
136 3
and it looks something like
[,1] [,2] [,3]
[1,] 402 675 1.802758
[2,] 402 696 1.938902
[3,] 402 699 1.994253
[4,] 402 945 1.898619
[5,] 424 470 1.812857
[6,] 424 905 1.816345
[7,] 470 905 1.871252
[8,] 504 780 1.958191
[9,] 504 848 1.997111...............
2010 Jun 25
1
dimnames(x) <- dn error
Hi ,
I want to assign names to the rows in my matrix so that when I use the
'agnes' function from R cluster package , the dendogram that is produced
represents the rows of the matrix. This way I would know what elements in
the matrix are clustered together. But when I do the following,
rownames(distF) <- paste("A",dim(distF)[1])
it gives the following error;
Error in
2010 May 25
2
error : subscript out of bounds
Hi,
I'm trying to calculate euclidean distance for my matrix rx1. Its a big
matrix with 947 elements. However when i do the following,
for(k in 1:947) for(m in (k+1):947){
A =rbind(A,c(k,m,ED(rx1[,k], rx1[,m])))
}
I get the following error:
ED(rx1[,k], rx1[,m]) : subscript out of bounds
I checked for k in 1:100 and it runs fine; its a huge matrix and takes
atleast an hour to run before I