<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>h-wadsworth02</author_name>
  <author_url>https://blog.hatena.ne.jp/h-wadsworth02/</author_url>
  <blog_title>データの裏側を歩く</blog_title>
  <blog_url>https://www.medi-08-data-06.work/</blog_url>
  <categories>
    <anon>R</anon>
  </categories>
  <description>Rでテーブルを縦持ち、横持ちに変換したい時、以前は、spreadやgatherという関数がありました。（今もあるのですが、）上記２つに代わって新たに上位互換の関数として登場したのがpivot_longer、pivot_widerです。単純に縦持ち、横持ち変換するだけでなく、列同士の結合や、集計など行うこともできます。 dplyrを使ったその他の前処理方法を知りたい方や、Pyhonで実行したいという方はこちらをご覧ください。 www.medi-08-data-06.work www.medi-08-data-06.work データの作成 まずはデータの作成を行います。作成するデータは、ある架空3…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.medi-08-data-06.work%2Fentry%2Fpivot_longer_pivot_wider&quot; title=&quot;そろそろ覚えるRで縦持ち横持ち変換〜pivlot_loger、pivot_wider〜 - データの裏側を歩く&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>https://cdn-ak.f.st-hatena.com/images/fotolife/h/h-wadsworth02/20210320/20210320160906.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-03-20 16:16:52</published>
  <title>そろそろ覚えるRで縦持ち横持ち変換〜pivlot_loger、pivot_wider〜</title>
  <type>rich</type>
  <url>https://www.medi-08-data-06.work/entry/pivot_longer_pivot_wider</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
