emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Roger Mason <rmason@mun.ca>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Passing a variable into an R source block.
Date: Sat, 29 May 2021 11:43:33 -0230	[thread overview]
Message-ID: <y651r9pvd9u.fsf@mun.ca> (raw)
In-Reply-To: <D9A24539-0E14-4AF5-B845-1DD73301A9A6@health.ucsd.edu>

Hello Charles & William,

Berry, Charles writes:

> data.frame($data) is not valid R syntax. If you are new to R doing some tutorials will help.
>
> I suggest you use C-c C-v C-v (org-babel-expand-src-block) to see what the R code is and debug the result given in the the *Org Babel Preview...* buffer.

You are correct, my R skills are _very_ rusty.  I did not know of
org-babel-expand-src-block, thanks for the pointer.  Very useful.

William Denton writes:

> The Org table is passed in to R as a data.frame, so all you need is this at the 
> start (with stringr loaded in previously):

Thanks William, that got me going in the right direction.

Roger




  reply	other threads:[~2021-05-29 14:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 15:52 Passing a variable into an R source block Roger Mason
2021-05-28 17:30 ` Berry, Charles via General discussions about Org-mode.
2021-05-29 14:13   ` Roger Mason [this message]
2021-05-28 19:29 ` William Denton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=y651r9pvd9u.fsf@mun.ca \
    --to=rmason@mun.ca \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).