Re: [R] Comparison of vectors in a matrix

2009-11-11 Thread esterhazy
That is wonderful, now I think I am all set! Thanks again! Tony Plate wrote: > > This is a tricky data entry problem. The right technique will depend on > the fine details of the data, and it's not clear what those are. E.g., > when you say "In my first column, for example, I have "henry" ",

Re: [R] Comparison of vectors in a matrix

2009-11-11 Thread Tony Plate
This is a tricky data entry problem. The right technique will depend on the fine details of the data, and it's not clear what those are. E.g., when you say "In my first column, for example, I have "henry" ", it's unclear to me whether or not the double quotes are part of the data or not - whi

Re: [R] Comparison of vectors in a matrix

2009-11-11 Thread David Winsemius
On Nov 11, 2009, at 1:02 PM, esterhazy wrote: Yes, thanks for this, this is exactly what I want to do. However, I have a remaining problem which is how to get R to understand that each entry in my matrix is a vector of names. I have been trying to import my text file with the names in eac

Re: [R] Comparison of vectors in a matrix

2009-11-11 Thread esterhazy
Yes, thanks for this, this is exactly what I want to do. However, I have a remaining problem which is how to get R to understand that each entry in my matrix is a vector of names. I have been trying to import my text file with the names in each vector of names enclosed in quotes and separated by

Re: [R] Comparison of vectors in a matrix

2009-11-10 Thread Tony Plate
Nice problem! If I understand you correctly, here's how to do it (with list-based matrices): set.seed(1) (x <- matrix(lapply(rpois(10,2)+1, function(k) sample(letters[1:10], size=k)), ncol=2, dimnames=list(1:5,c("A","B" A B 1 Character,2 Character,5 2 Character,2 Char