Skip to content

Commit ce49049

Browse files
committed
fix bug labelling rows of count and na_count
was incorrectly labelling after filtering instead of before
1 parent 3b81868 commit ce49049

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/filter_na_count.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ setMethod(f="method.apply",
7878
count[,k]=apply(D$data,2,function(x) sum(is.na(x[IF==L[k]])))
7979
}
8080
colnames(na_count)=L
81+
colnames(count)=L
82+
rownames(na_count)=colnames(D$data)
83+
rownames(count)=colnames(D$data)
8184

8285
flags=apply(na_count,1,function(x) any(x<M$threshold))
8386

@@ -88,11 +91,8 @@ setMethod(f="method.apply",
8891
M$filtered=D
8992
M$flags=data.frame(flags=flags)
9093
M$count=as.data.frame(na_count)
91-
rownames(count)=colnames(D$data)
92-
colnames(count)=L
9394
M$na_count=as.data.frame(count)
94-
rownames(na_count)=colnames(D$data)
95-
colnames(na_count)=L
95+
9696
return(M)
9797
}
9898
)

0 commit comments

Comments
 (0)