<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hoxo_m</author_name>
  <author_url>https://blog.hatena.ne.jp/hoxo_m/</author_url>
  <blog_title>ほくそ笑む</blog_title>
  <blog_url>https://hoxo-m.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>R言語のコミュニティ https://r-wakalang.slack.com で回答したのでメモ。 質問はこんな感じ（意訳しています）。 次のようなデータを以下のルールで処理したい。 データを上から下に見ていき、 (1) before に TRUE が出たら、それ以降は after を TRUE にする。 (2) ただし、condition が FALSE になったら after を FALSE にして状態をリセットする。 これを、for を使わないやり方で書きたい。（データにすでにある after は答えあわせ用） before condition after 1 FALSE FALSE …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhoxo-m.hatenablog.com%2Fentry%2F2023%2F10%2F28%2F193616&quot; title=&quot;状態を持つループ処理を accumulate() でシンプルに書く - ほくそ笑む&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>2023-10-28 19:36:16</published>
  <title>状態を持つループ処理を accumulate() でシンプルに書く</title>
  <type>rich</type>
  <url>https://hoxo-m.hatenablog.com/entry/2023/10/28/193616</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
