Hi, I have a data file which is named test.txt as below. Prior to that, I have converted the last row from nominal to numeric using as.integer.
Statement T1001 T1002 T1003 T1004 T1005 T100 T1014 T1021 T1022 T1023 1 0 0 0 0 0 0 0 0 1 0 0 2 0 0 0 0 0 0 0 0 1 0 0 3 0 1 0 0 1 0 0 0 1 0 0 4 406 pass pass fail pass pass pass pass pass pass pass After as.integer of "pass", the below data is been transformed. Statement T1001 T1002 T1003 T1004 T1005 T100 T1014 T1021 T1022 T1023 1 0 0 0 0 0 0 0 0 1 0 0 2 0 0 0 0 0 0 0 0 1 0 0 3 0 1 0 0 1 0 0 0 1 0 0 4 0 1 1 0 1 1 1 1 1 1 1 The 1,2,3 and 4 on the first column is the automatic numbering seen on the terminal when i pasted here. And, i try to use matrix multiplication which is as.matrix(data[1:3,2:11])%*% sign(t(data[4,2:11])) Basically i wanted to count from column 2 onwards..which i want to ignore the Statement column data. Error in sign(t(data[4, 2:11])) : Non-numeric argument to mathematical function. I try take off the column constraint which is as.matrix(data[1:3,])%*% sign(t(data[4,])) but it still gives me Error in sign(t(data[4, ])) : Non-numeric argument to mathematical function I didnt understand how this error relate to my data above. Because my data is not a character at the first place and its a data.frame. Please help.Thanks.. Rgrds, Jason [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.