emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BABEL] How to pass vector to R as variable?
@ 2014-01-09 11:21 Rainer M Krug
  2014-01-09 12:40 ` Christian Moe
  0 siblings, 1 reply; 3+ messages in thread
From: Rainer M Krug @ 2014-01-09 11:21 UTC (permalink / raw)
  To: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

I want to pass a vector to R, defined in org as a variable. At the
moment I am doing the following,


#+NAME: COLSTOEVAL
   | NPPyCcc |
   | test    |

#+PROPERTY: var COLs_TO_EVAL=COLSTOEVAL

#+begin_src R :exports both :results output
COLS_TO_EVAL[,1]
class(COLS_TO_EVAL[1,])
#+end_src

#+RESULTS:
: [1] "NPPyCcc, test"
: [1] "character"

which works, but I assume there is a way of defining COLS_TO_EVAL as a
vector?

If not, is there an easier way of doing it then I do?

Thanks,

Rainer

- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSzoY2AAoJENvXNx4PUvmCqfgH/j2Bu/b/s//igUEkuNMmehuh
ie+vQAo230PUnsz2QGtJ4Pl2iP4ZhKTBvbpujEqk58fUbhKFyXQ98UxaGAvChevE
Sc+jnLktWlgTgS9f+zr1jarJDVtgChEy1AM7n0CPKQ90G0a//d+oC2TWPEAL2xxq
HAHDY5DeyhOlHPV39CHlGHmMy5n1tSKsccoVfLq7rIqwg0fI1KfYyonQDJU1BxPL
sep++c7yyTTj31NcKUK9jg6TafaDfsi1FYBGe2z6JngeJvS/fqVLN29orIJOspiK
nJD896pTDMerfl/VJk0KHTykYA1nNm7+Ozrvp+Mk/9Xqa1LhG4ODPWeG1AQ1R48=
=J8PT
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-09 15:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-09 11:21 [BABEL] How to pass vector to R as variable? Rainer M Krug
2014-01-09 12:40 ` Christian Moe
2014-01-09 15:05   ` Rainer M Krug

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).