<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>choron81</author_name>
  <author_url>https://blog.hatena.ne.jp/choron81/</author_url>
  <blog_title>いろいろ倉庫</blog_title>
  <blog_url>https://choron81.hatenablog.com/</blog_url>
  <categories>
    <anon>R</anon>
    <anon>Tips</anon>
  </categories>
  <description>・お題：data.frameの特定の行・列の値を代入したい。 ・適当にdata.frameを作成する。 library(tidyverse) df &lt;- matrix(c(1:96), nrow = 8, ncol = 12) %&gt;% as.data.frame() df ・baseでやってみる。特定のセルに代入。 df[3,4] &lt;- 100df ・インデックスのベクトルでも指定できる。 df[3:6,4] &lt;- 100df df[3:6,4:7] &lt;- 100df ・行丸ごと代入する。 df[3:6,] &lt;- 100df ・行と列の選択にbool型を使うこともできる。 df[, colna…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchoron81.hatenablog.com%2Fentry%2F2024%2F06%2F24%2F000000&quot; title=&quot;【R】data.frameの特定の行・列の値を代入したい - いろいろ倉庫&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.blog.st-hatena.com/images/theme/og-image-1500.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-06-24 00:00:00</published>
  <title>【R】data.frameの特定の行・列の値を代入したい</title>
  <type>rich</type>
  <url>https://choron81.hatenablog.com/entry/2024/06/24/000000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
