Entering edit mode
                    21 months ago
        sata72
        
    
        •
    
    0
    Hi, I want to have a table and a plot for showing the average cov of each chromosome in column 1 in R.
Thanks in advance!
head(data)
  chr    str      end   cov
 1       847      897    2
 1       14111    14161  8
 1       14270    14308  1
 1       14308    14320  6
 1       14320    14322  5
 1       14322    14358  9
Did you try anything before? Please google "average by group in R", there is a great many solutions already available.
See:
Thanks, This command worked for me:
about the plots these two options work as well:
Option 1:
Option 2:
Now the question is how i can filter for specific chr column (for example just for chr 1:20)?
Hi
Try in R :
They want to group by chr, and get mean of cov columns. See links in ATpoint's comment above.