search for: rec_compare

Displaying 1 result from an estimated 1 matches for "rec_compare".

Did you mean: gen_compare
2009 Apr 04
1
comparing columns in a dataframe
...s, 'union' a file with 303 rows and 'setdiff' a file with 130 rows Below is the code that I have started with. Ideally I would like to identify the actual row numbers where there is difference in the variables (either pairwise or between 3 variables). x <- read.csv("c://rec_compare.csv",header=T, as.is=TRUE) u <- union(x$rm1, x$redc1) write.csv(u,"c:/union_test.csv") i <- intersect(x$rm1, x$redc1) write.csv(i,"c:/intersect_test.csv") sd <- setdiff(x$rm1, x$redc1) write.csv(sd,"c:/setdiff_test.csv") Any suggestions are appreciate...