Re: [R] Need help using Melt and cast to compute correlation for a cross tabulation

2012-03-01 Thread jim holtman
Here is another way of doing it: > x <- read.table(text = " Count Volume FCLASS + 1 55000 6 'Grade Separated' + 2 43000 39000 'Grade Separated' + 3 26000 26500 'Major Arterial' + 4 19500 2 'Major Arterial'", as.is = TRUE) > result <- sapply(spli

[R] Need help using Melt and cast to compute correlation for a cross tabulation

2012-03-01 Thread Walter Anderson
I have a data frame with a number of observed and predicted values by classification as shown below: Count Volume FCLASS 1 55000 6 Grade Separated 2 43000 39000 Grade Separated 3 26000 26500 Major Arterial 4 19500 2 Major Arterial ... There