[R] build matrix with the content of one column of a data frame in function of two factors

From: VinceD <vincent.degove_at_laposte.net>
Date: Wed, 09 Jul 2008 09:15:17 -0700 (PDT)

Hello,

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 :

str(votesredac)

'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 better.

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.

______________________________________________
R-help_at_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.
Received on Wed 09 Jul 2008 - 18:11:21 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 10 Jul 2008 - 14:31:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive