[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Passing a variable into an R source block.
From: |
Roger Mason |
Subject: |
Re: Passing a variable into an R source block. |
Date: |
Sat, 29 May 2021 11:43:33 -0230 |
User-agent: |
mu4e 1.5.6; emacs 27.2 |
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