From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Using cat() with R prints R session prompt (>) in results block Date: Fri, 22 Mar 2013 18:19:21 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJBF5-0002LJ-UB for emacs-orgmode@gnu.org; Fri, 22 Mar 2013 19:19:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UJBF4-0001SZ-F0 for emacs-orgmode@gnu.org; Fri, 22 Mar 2013 19:19:23 -0400 Received: from mail-la0-x236.google.com ([2a00:1450:4010:c03::236]:51779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJBF4-0001SR-83 for emacs-orgmode@gnu.org; Fri, 22 Mar 2013 19:19:22 -0400 Received: by mail-la0-f54.google.com with SMTP id gw10so8130729lab.41 for ; Fri, 22 Mar 2013 16:19:21 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode With an older orgmode file, I used a block like shown in this thread to export multiple plots resulting from some modeling work in my summary document: - http://lists.gnu.org/archive/html/emacs-orgmode/2012-08/msg01222.html The code I used was like so: #+begin_src R :session model :results output raw :exports results cat("#+begin_center") cat("\n") for() { output-filename <- something[i] ggplot code pdf(output-filename) print(p) dev.off() cat(paste("[[../plots/",output-filename,"]]",sep=""), sep="\n") cat("\n") } # end plotting loop cat("#+end_center") #+end_src When I do that now, I'm getting the > prompt from my R session output with the cat() command. For example: #+name: test #+begin_src R :session r :results output raw :exports results cat(paste("#+end_center")) cat("\n") #+end_src #+RESULTS: test #+end_center> How do I stop that? As a side note... if I remove cat("\n"), nothing gets put into the #+results block -- it's just empty. I don't understand why. Thanks, John