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

* Re: [BABEL] How to pass vector to R as variable?
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Moe @ 2014-01-09 12:40 UTC (permalink / raw)
  To: Rainer; +Cc: emacs-orgmode


Rainer M Krug writes:

> I assume there is a way of defining COLS_TO_EVAL as a
> vector?

I don't think so.

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

Well, COLS_TO_EVAL$V1 is one character less to type than
COLS_TO_EVAL[,1] ...

Yours,
Christian

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

* Re: [BABEL] How to pass vector to R as variable?
  2014-01-09 12:40 ` Christian Moe
@ 2014-01-09 15:05   ` Rainer M Krug
  0 siblings, 0 replies; 3+ messages in thread
From: Rainer M Krug @ 2014-01-09 15:05 UTC (permalink / raw)
  To: Christian Moe; +Cc: emacs-orgmode

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



On 01/09/14, 13:40 , Christian Moe wrote:
> 
> Rainer M Krug writes:
> 
>> I assume there is a way of defining COLS_TO_EVAL as a vector?
> 
> I don't think so.

Pity - but I should be able to live with it as it is.

Thanks,

Rainer

> 
>> If not, is there an easier way of doing it then I do?
> 
> Well, COLS_TO_EVAL$V1 is one character less to type than 
> COLS_TO_EVAL[,1] ...
> 
> Yours, Christian
> 

- -- 
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/

iQEcBAEBAgAGBQJSzrqcAAoJENvXNx4PUvmCa0MIALNt0MkXefrCRlWirzdh5l67
DOnAD4iALRcxWe/qfA1MrlGMDHPW+VaJ4noUazBsqTBrRNl/Z7z0wCZOFB/VZ/nJ
MOMtVbQQyGv/J6pUfL3k7QqXqLA4qE14MAFOFDrmZX0QIX3Sj2hrY1r8IGha2FBg
AVAy0efz+YQ9cRraUYfyEJ1Q7vvFqSkICznbfvV9RlWNm2nY8C5VZp1H8MsQrMW9
UOzPqZsqSYi7pf9stV0aH0P/Gm79Rt+QnlfegklF9YLLQOeCgUkbwz1BktDcebyM
G10btHq7p6YaR2u8TFihNYy29R6Vg0YYZzPIKqv4iL2emgOdEBK1EtmZ+PkGCRY=
=ZeZU
-----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).