Hello,
I believe this is an easy scripting problem, but one I am stumbling on.
I have a "known" vector of 3 colors with nrow=10:
known<-c("red", "blue", "red", "red", "yellow", "blue", "yellow", "blue",
"blue", "yellow")
and a model output vector:
modelout<-c("red", "red", "red", "blue", "yellow", "blue", "blue", "red",
"blue", "yellow")
I would like to determine the proportion (in)correctly identified for each
color. In other words:
% correct "red"=
% correct "blue"=
% correct "yellow"=
How would I code this (assuming the actual dataset is more complex)?
Any help would be much appreciated.
Thank you,
Scott
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.