<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>potisan</author_name>
  <author_url>https://blog.hatena.ne.jp/potisan/</author_url>
  <blog_title>potisanのプログラミングメモ</blog_title>
  <blog_url>https://potisan-programming-memo.hatenablog.jp/</blog_url>
  <categories>
    <anon>R</anon>
  </categories>
  <description>ベクトルから開始位置をずらした等長のベクトルを作成して関数を呼び出すコードです。dplyr (tidyverse)を使用しています。 require(dplyr) # ベクトルのstart個めとそこからdiff個ずらした2個の配列のデータフレームを返します。 vec_shifted_tibble &lt;- function(x, start, diff, col_names=c(&quot;x&quot;,&quot;y&quot;), invert=FALSE) { a &lt;- x[start:(length(x)-diff)] b &lt;- x[(start+diff):length(x)] if (!invert) ret &lt;- tib…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpotisan-programming-memo.hatenablog.jp%2Fentry%2F2021%2F05%2F25%2F235906&quot; title=&quot;R&amp;amp;tidyverse ベクトルから開始位置をずらした2つの等長ベクトルを作成して関数を呼び出す - potisanのプログラミングメモ&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>2021-05-25 23:59:06</published>
  <title>R&amp;tidyverse ベクトルから開始位置をずらした2つの等長ベクトルを作成して関数を呼び出す</title>
  <type>rich</type>
  <url>https://potisan-programming-memo.hatenablog.jp/entry/2021/05/25/235906</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
