[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Error Embedding SQL Source from code block into R Source of Another

From: Eric Brown
Subject: [O] Error Embedding SQL Source from code block into R Source of Another (noweb)
Date: Mon, 29 Sep 2014 19:39:30 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.93 (gnu/linux)

Dear List:

It is possible to embed SQL code as a string to be evaluated in R. I am
interested in formatting the SQL code in its own source code block, with
its own syntax highlighting and editing mode (C-c ').

The first time I run the code, I am prompted for R starting directory,
but I get an error:

load ESSR: + + + Error: unexpected string constant in:
local=TRUE) #define load.ESSR

and the console locks.  I can C-g to get out of it, and then
re-evaluate, and the code prints what I expect -- the text of the SQL

Is this the right way to go about this?  Have I discovered a bug, or
perhaps accidentally a wrong way to get the right answer?

Is this an ESS problem, and not an orgmode problem, per se?  My ESS
normally starts up fine, so I thought I would ask on this list first.

A minimal example (first failing, second evaluation giving expected
output) follows.

Best regards,


Debian GNU/Linux (jessie)
Emacs 24.3.93
Org current from org repo
ESS from MELPA (ca. 14.09)
R 3.1.1 compiled from source

----- SESSION -----
#+TITLE: Test SQL Code
#+AUTHOR: Eric Brown                                              
#+EMAIL: address@hidden
#+PROPERTY: session *R*                                           
#+PROPERTY: cache no

#+name: sqlsource
#+begin_src sql :engine postgresql :eval yes :noweb-ref sqlsrc :exports code 
:results none

#+name: rsource
#+begin_src R :noweb yes :results output :exports both
  input <- '
  # dbGetQuery(connectionHandle, input)

#+RESULTS: rsource
: select 
:   * 
: from 
:   t 
: limit 
:   10

reply via email to

[Prev in Thread] Current Thread [Next in Thread]