search for: columns_

Displaying 2 results from an estimated 2 matches for "columns_".

Did you mean: columns
2012 Jan 24
5
drop columns whose rows are all 0
Hello, I have a dataset with 40 variables, some of them are always 0 (each row). I would like to make a subset containing only the columns which values are not all 0, but I don't know how to do it. I tried: for(cut_column in 1:40) { if(sum(dataset[,cut_column])!=0) { columns_useful<-c(columns_useful,dataset[cut_column]) } } sorted_dataset<-subset(dataset, select=columns_useful) But it doesn't work. Thank you Francisco
2007 Dec 06
1
Randomizing one column in the dataMatrix
I have huge data file, and I would like randomize just one column at a time , is there any easy way? Thanks a lot. -- View this message in context: http://www.nabble.com/Randomizing-one-column-in-the-dataMatrix-tf4957535.html#a14197423 Sent from the R help mailing list archive at Nabble.com.