From: "Thomas S. Dye" <tsd@tsdye.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: [babel] Idiomatic handling of quotes
Date: Thu, 17 Dec 2009 10:15:06 -1000 [thread overview]
Message-ID: <D66D7851-44D9-490A-8EA5-271BFE96FEEB@tsdye.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1177 bytes --]
Aloha all,
In the example below, note that the R representation of the directory
listing escapes the quotes in the original and encloses it all in a
second set of quotes, e.g. "\"theta-1.csv\"".
This must come up a lot. Is there an idiomatic way to change
"\"theta-1.csv\"" to "theta-1.csv" so that it could be assigned to x
and the following statement would yield a valid path?
afile <- paste("r/",x,sep="")
I'm aware the answer might be R code, but it is to tightly tied to org-
babel I figure it makes sense to ask the question here.
All the best,
Tom
--------------- Example -------------------
*** Dated events
#+srcname: thetas()
#+begin_src shell
cd r && ls theta*
#+end_src
#+results: thetas
| "theta-1.csv" |
| "theta-2.csv" |
...
#+srcname: test-list(x = thetas)
#+begin_src R :session
str(x)
x
#+end_src
#+results: test-list
| "theta-1.csv" |
| "theta-2.csv" |
...
tdye> str(x)
'data.frame': 8 obs. of 1 variable:
$ V1: chr "\"theta-1.csv\"" "\"theta-2.csv\"" "\"theta-3.csv\""
"\"theta-4.csv\"" ...
Thomas S. Dye, Ph.D.
T. S. Dye & Colleagues, Archaeologists, Inc.
Phone: (808) 529-0866 Fax: (808) 529-0884
http://www.tsdye.com
[-- Attachment #1.2: Type: text/html, Size: 4212 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next reply other threads:[~2009-12-17 20:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 20:15 Thomas S. Dye [this message]
[not found] ` <D66D7851-44D9-490A-8EA5-271BFE96FEEB-P0awH739Ni4AvxtiuMwx3w@public.gmane.org>
2009-12-18 9:20 ` [babel] Idiomatic handling of quotes Francesco Pizzolante
2009-12-18 18:22 ` Thomas S. Dye
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D66D7851-44D9-490A-8EA5-271BFE96FEEB@tsdye.com \
--to=tsd@tsdye.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).