[R] Need help to transform data into co-occurence matix
Tim F Liao
tfliao at uiuc.edu
Fri Jan 21 04:49:52 CET 2005
Judie,
You may want to see if the MedlineR library, which has a
program for constructing co-occurrence matrices, will work for
you. The program can be found at:
http://dbsr.duke.edu/pub/MedlineR/
Have fun with it,
Tim Liao
Professor of Sociology & Statistics
University of Illinois
Urbana, IL 61801
---- Original message ----
>Date: Thu, 20 Jan 2005 18:19:19 -0800 (PST)
>From: Judie Z <judielife at yahoo.com>
>Subject: [R] Need help to transform data into co-occurence
matix
>To: r-help at stat.math.ethz.ch
>
>Dear R experts,
>I have the data in the following fomat(from some kind of card
sorting process)
>
>ID Category Card numbers
>1 1 1,2,5
>1 2 3,4
>2 1 1,2
>2 2 3
>2 3 4,5
>
>I want to transform this data into two co-occurence matrix
(one for each ID)
>-- For ID 1
> 1 2 3 4 5
>1 1 1 0 0 1
>2 1 1 0 0 1
>3 0 0 1 1 0
>4 0 0 1 1 0
>5 1 1 0 0 1
>
>-- For ID 2
> 1 2 3 4 5
>1 1 1 0 0 0
>2 1 1 0 0 0
>3 0 0 1 0 0
>4 0 0 0 1 1
>5 0 0 0 1 1
>
>The columns and rows are representing the card numbers. All
"0"s mean the card numbers are not in the same category, vice
versa.
>
>Is there any way I can to this in R?
>I would really appreciate your help.
>
>Judie, Tie
>
>
>
>
>---------------------------------
>
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
More information about the R-help
mailing list