Displaying 1 result from an estimated 1 matches for "prr2".
Did you mean:
err2
2011 May 26
1
matrix not working
...columns c and d, but the only outputs are
those from column d
- some values from column d are NA
- column d was created with the code:
df$d=rank(df$c, na.last="keep")
#----------R Code---------#
item=unique(df$a)
n=length(list)
r=matrix(data=NA,nrow=n, ncol=n, dimnames=list(PRR1=item, PRR2=item))
for(j in 2:ln)
{
for(i in 1:(j-1))
{
input1=rownames(r)[i]
input2=colnames(r)[j]
q=df[(df$a==input1 & df$b==input2), "d"]
if(length(q)==0)
{
q=df[(df$a==input2 & df$b==input1), "d"]
}
if(length(q)==0)
{
q=NA...