search for: my_mat

Displaying 3 results from an estimated 3 matches for "my_mat".

2012 Mar 23
1
R conditional matrix operations - advanced condition
...irst column of the matrix) but the result is that the function takes the condition only from the first row of column for calculations in every row. Is it possible to solve this problem as a matrix calculation or I have to iterate over each row? (which I suppose is much slower) #problem looks like: my_mat <- matrix(1:50,ncol=2) my_mat <- cbind(my_mat,0) #here I have a matrix with empty third column where I want to store my results my_data <- rnorm(25) #this is a dataset I want to use for filling the third column #and I did my_mat[,3] <- sum(my_data[1:my_mat[,1]]) + my_mat[,2] #which...
2012 Jun 07
1
select subrows based on a specific column in a matrix
Hi all, I have a matrix with 10000 rows and 10 columns. The last columns contains another identifiers but the values are not uniques so that I want to generate another matrix with rows with unique values in the last column. If I did tmp<-unique(my_mat$col10) this will give me 8560 unique entries so the ideal matrix will be 8560X10 columns now then. I tried sub_mat<-my_mat[tmp,] but it generated weird results with many "NA" values and the order was not changed. The original matrix was ranked from top so I don't want to lose...
2017 Jan 16
4
Error K-MEDIAS, paquete NbClust windows 10, 64 bits
Buenos dias, desde hace algunos dias estoy realizando un trabajo,mi computadora es una DELL, windows 10 64 bits, 8G de RAM y disco de estado solido, estoy procesando 29000 filas y 23 columnas, mi codigo es este: nb <- NbClust(datos.scaled, distance = "euclidean", min.nc = 2, #max.nc = 10, method = "complete", index ="all") . y mi error es este: Error: