<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>uncorrelated</author_name>
  <author_url>https://blog.hatena.ne.jp/uncorrelated/</author_url>
  <blog_title> 餡子付゛録゛</blog_title>
  <blog_url>https://uncorrelated.hatenablog.com/</blog_url>
  <categories>
    <anon>C/C++</anon>
    <anon>R言語</anon>
  </categories>
  <description>検索するとCからRを呼ぶコード例は色々とあるのですが、本家Writing R Extensionsを含めて、CでRの対話実行を制御するコードが多いので、もっと単純にRの関数を呼ぶコードを書いてみました。 Cのコード コンパイルと実行 Cのコード 初期化の後は.Callや.Externalと同様に、CからRの機能を呼び出すことができます。embedding_R.c #include&lt;stdio.h&gt; #include&lt;stdlib.h&gt; #include&lt;R.h&gt; #include&lt;Rinternals.h&gt; #include&lt;Rembedded.h&gt; #include&lt;R_ext/Parse.…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Funcorrelated.hatenablog.com%2Fentry%2F2025%2F03%2F18%2F095008&quot; title=&quot;Cの中でRを動かす -  餡子付゛録゛&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>2025-03-18 09:50:08</published>
  <title>Cの中でRを動かす</title>
  <type>rich</type>
  <url>https://uncorrelated.hatenablog.com/entry/2025/03/18/095008</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
