Skip to content

Commit 73c2f35

Browse files
committed
Update corr_coef_class.R
1 parent f4f86b5 commit 73c2f35

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/corr_coef_class.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ setMethod(f="method.apply",
8181
}
8282

8383
out=apply(D$data,2,fcn)
84-
out=as.data.frame(t(out))
84+
out=as.data.frame(t(out),stringsAsFactors = FALSE)
8585

86-
M$p_value=data.frame('p_value'=p.adjust(out[,2],method=M$mtc),row.names = colnames(D$data))
87-
M$coeff=data.frame('coeff'=out[,3],row.names = colnames(D$data))
88-
M$significant=data.frame('significant'=p.adjust(out[,2],method=M$mtc)>M$alpha,row.names = colnames(D$data))
86+
M$p_value=data.frame('p_value'=p.adjust(as.numeric(out[,2]),method=M$mtc),row.names = colnames(D$data))
87+
M$coeff=data.frame('coeff'=as.numeric(out[,3]),row.names = colnames(D$data))
88+
M$significant=data.frame('significant'=M$p_value<M$alpha,row.names = colnames(D$data))
8989

9090
return(M)
9191
}

0 commit comments

Comments
 (0)