[R] Aggregate data and table function

m.marcinmichal m.marcinmichal at gmail.com
Sat Jul 16 21:45:23 CEST 2011


Hi,
suppose we have a data in data.frame like a:

data
  id q1 q2 q3 c
1  1  0  0  1 a
2  2  0  0  1 b
3  3  1  0  0 b
4  4  0  1  0 a

I need from this data receive cross validation table  like a 

 a b   <-- classified as
 2 0 | a = a
 1 1 | b = b

Plus i need have information about 'id' i.e I need known what object I wrong
classified. Suppose in (b,a) I need save object 'id'. In this example  into
(b,a) I need save only one id = 2 c(2). The object for id 2 will be class
'a' not 'b'

for respone many thanks

Best,

Marcin M.

--
View this message in context: http://r.789695.n4.nabble.com/Aggregate-data-and-table-function-tp3672339p3672339.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list