emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [babel] Idiomatic handling of quotes
@ 2009-12-17 20:15 Thomas S. Dye
       [not found] ` <D66D7851-44D9-490A-8EA5-271BFE96FEEB-P0awH739Ni4AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas S. Dye @ 2009-12-17 20:15 UTC (permalink / raw)
  To: Org Mode


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

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

end of thread, other threads:[~2009-12-18 18:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-17 20:15 [babel] Idiomatic handling of quotes Thomas S. Dye
     [not found] ` <D66D7851-44D9-490A-8EA5-271BFE96FEEB-P0awH739Ni4AvxtiuMwx3w@public.gmane.org>
2009-12-18  9:20   ` Francesco Pizzolante
2009-12-18 18:22     ` Thomas S. Dye

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