[R] build matrix with the content of one column of a data frame in function of two factors
vincent.degove at laposte.net
Wed Jul 9 18:15:17 CEST 2008
First, thanks for your help (and sorry for my english !)
I have a data frame in which each row represents a vote (in percent, only
20,40, 60,80,100) of one person on one content, with three columns : name
(the name of the voters), content_id, vote :
'data.frame': 1000 obs. of 3 variables:
$ name : chr "Guillemette Faure" "Guillemette Faure" "Guillemette
Faure" "Pascal Rich\xe9" ...
$ content_id: num 385241 384926 384635 383266 384814 ...
$ value : num 100 100 100 20 100 100 20 100 100 100 ...
I want to build a matrix with one column for each content and one line for
each user, containing the votes. This matrix can content NAs (each person
hasn't voted on all contents). If each row and column was labelled, would be
Thanks again !
View this message in context: http://www.nabble.com/build-matrix-with-the-content-of-one-column-of-a-data-frame-in-function-of-two-factors-tp18364752p18364752.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help