[R] simple matching with R

2012-03-19 Thread Lisa Krchov
Hello, I would like to use the simple matching coefficient in R to compare genotypic data from two years (there are some inconsistencies in the genotype notations in the 2 years and I want to find out the error). Is there a R code I could use? How does my matrix needs to look like? I have 50

Re: [R] simple matching with R

2007-09-28 Thread Jeffrey Robert Spies
Not sure how you want to handle the NAs, but you could try the following: #start MalVar29_37 - read.table(textConnection(V1 V2 V3 V4 V5 V6 V7 V8 V9 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 NA NA NA NA NA NA NA NA NA 0 1 0 0 0 1 0 0 0), header=TRUE)

Re: [R] simple matching with R

2007-09-28 Thread Birgit Lemcke
Thanks a lot for both solutions of my problem. I tried it immediately and I understood how they are working. The next problem for me is now to deal with the NAs. I thought perhaps it is possible to exclude the variable from the row comparison if in one of the rows is an NA? Furthermore it