emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Babel][R] Inclusion of multi-line named code blocks in R code
@ 2013-09-18 21:51 Alexander Vorobiev
  2013-09-18 22:27 ` Thomas S. Dye
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Vorobiev @ 2013-09-18 21:51 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 787 bytes --]

I have R code which submits SQL statements to a database server. Since the
SQL is rather complex, I want to put it into a separate code block in order
to have proper formatting, syntax highlighting, etc:

#+name: long-sql
#+begin_src sql
    select *
    from many, tables
    where
        complex_condition1 = 1,
        complex_condition2 = 2
#+end_src

* Load the data to R session
#+begin_src R :session *R* :noweb yes
    result <- submit_query('<<long-sql>>')
#+end_src

Unfortunately, the R block doesn't work. When I open the file generated by
Babel, I see this:

result <- submit_query('select *
result <- submit_query('from many, tables
etc

instead of the one R submit_query call with my SQL statement as an
argument. Is there anything I can do to achieve that?

Thanks
Alex

[-- Attachment #2: Type: text/html, Size: 1172 bytes --]

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

end of thread, other threads:[~2013-10-07 20:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-18 21:51 [Babel][R] Inclusion of multi-line named code blocks in R code Alexander Vorobiev
2013-09-18 22:27 ` Thomas S. Dye
2013-09-19  0:43   ` Alexander Vorobiev
2013-09-19 15:14     ` Alexander Vorobiev
2013-10-07 15:42     ` Thomas S. Dye
2013-10-07 20:58       ` Alexander Vorobiev

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