I am using a code like
我使用的是代码。
df2<-df[1:3000,]
tail(df2)
df4<-(table(df2)>0)*1
dim(df4)
m.adj<-matrix(0,nc=1:5217,nr=5217)
for(i in 1:5215){
for(j in (i+1):5216){
m.adj[i,j]<-sum(df2[,i]*df2[,j])
}
}
Error in `[<-`(`*tmp*`, i, j, value = NA_integer_) :
subscript out of bounds
df2<-df[1