Filter rows below a given threshold
1
0
Entering edit mode
4.0 years ago

Hey everyone,

I have a numeric matrix like this one

1       4       0.439453125
1       5       0.03662109375
1       6       0.49609375
1       9       0.4384765625
1       14      0.55322265625
1       18      1

I would like to remove all rows with a threshold <0.3 based on the 3rd column. Could you help me out? Thanks!

sequence • 703 views
ADD COMMENT
0
Entering edit mode

...tell me what you have already tried?

... ¿dime lo que has ya intentado?

ADD REPLY
1
Entering edit mode
4.0 years ago

To remove rows from a tab-delimited text file, where the third column is less than 0.3:

$ awk -v FS="\t" -v OFS="\t" '($3>=0.3)' in.txt > out.txt
ADD COMMENT

Login before adding your answer.

Traffic: 2689 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6