[R] Ranking correlation with R
Gabor Grothendieck
ggrothendieck at gmail.com
Sat Apr 10 14:58:01 CEST 2010
Try this:
> A <- c("file1.java", "file3.java", "file2.java")
> B <- c("file2.java", "file4.java", "file1.java")
> cor(A, B, method = "spearman")
[1] 0.5
On Fri, Apr 9, 2010 at 11:22 AM, David Nemer <davidnemer at gmail.com> wrote:
> Hey Everyone,
>
> Im fresh new in R, and Im supposed to write a code to give me a correlation
> between two rankings. So I have two ranking lists, which contain file names,
> e.g.:
>
> Ranking list 1:
> file1.java
> file3.java
> file2.java
>
> Ranking list 2:
> fiile2.java
> file4.java
> file1.java
>
> I need to see how much are these two ranking lists are alike, get a
> correlation between them. I dont even know where to start. Can anyone bring
> me some light or tips? Thank you in advance.
>
> Cheers,
> --
> David Nemer
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org 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.
>
More information about the R-help
mailing list