Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- count_matrix<-read.csv(file = "count_matrix.csv",row.names=1)
- eilsk<-nrow(count_matrix)
- stulpsk<-ncol(count_matrix)
- palikti<-NULL
- i<-1
- while(i<=eilsk)
- {
- x<-1
- nenuliai<-0
- while(x<=stulpsk)
- {
- if(count_matrix[i,x]!=0)
- {
- nenuliai<-nenuliai+1
- }
- x<-x+1
- }
- #print(nenuliai/stulpsk)
- if(nenuliai/stulpsk>0.2)
- {
- palikti <- append(palikti, i)
- }
- i<-i+1
- }
- write.csv(count_matrix[palikti,], file="count_matrix_small.csv")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement