<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>MikuHatsune</author_name>
  <author_url>https://blog.hatena.ne.jp/MikuHatsune/</author_url>
  <blog_title>驚異のアニヲタ社会復帰の予備</blog_title>
  <blog_url>https://mikuhatsune.hatenadiary.com/</blog_url>
  <categories>
    <anon>医学</anon>
    <anon>遺伝医学</anon>
    <anon>LINUX</anon>
    <anon>高度情報化</anon>
  </categories>
  <description>RNAseqをしているが、行に5つくらいのデータがあって、それらすべてが0 の行を取り除きたいのだが、いい方法はないかと聞かれた。 列和であれば、$2 とかしてすぐに結果が出せるのはぐぐってよく出る。 しかし、行和をどうこうするのはなかなか出てこない。 というわけで、行がいくつあるかの変数 NF と、行についてfor を回して0 かどうかの論理判断をして、すべて0 だった場合は除外、そうでなければprint して残す、というif 文でゴリ押しする。 R のワンライナーで適当にinput.txt を作成する R -q -e 'nr&lt;-8;nc&lt;-5;a&lt;-matrix(runif(nr*nc,1…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmikuhatsune.hatenadiary.com%2Fentry%2F20171118%2F1511010482&quot; title=&quot;awk を使って行の要素がすべて0 の行を除外する - 驚異のアニヲタ社会復帰の予備&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-11-18 22:08:02</published>
  <title>awk を使って行の要素がすべて0 の行を除外する</title>
  <type>rich</type>
  <url>https://mikuhatsune.hatenadiary.com/entry/20171118/1511010482</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
