From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: Problem with R source blocks Date: Fri, 12 Jun 2015 15:33:48 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3XWM-0002Gk-6i for emacs-orgmode@gnu.org; Fri, 12 Jun 2015 18:33:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z3XWJ-0007Zb-0Q for emacs-orgmode@gnu.org; Fri, 12 Jun 2015 18:33:54 -0400 Received: from iport-acv4-out.ucsd.edu ([132.239.0.7]:16380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3XWI-0007Z6-NP for emacs-orgmode@gnu.org; Fri, 12 Jun 2015 18:33:50 -0400 In-Reply-To: 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: "Thomas S. Dye" Cc: emacs-orgmode@gnu.org On Fri, 12 Jun 2015, Thomas S. Dye wrote: > Hi Chuck, > > "Charles C. Berry" writes: > >> The error messages are coming from R. cbind will say: >> >> : Error in data.frame(..., check.names = FALSE) : >> : arguments imply differing number of rows: 2, 3 > > I think the problem is in ggplot2, rather than my for loop: > > ,--------------------------------------------------------------------------- > | [1] "ERROR : arguments imply differing number of rows: 76, 69" > | Warning messages: > | 1: In loop_apply(n, do.ply) : > | Removed 3 rows containing missing values (position_stack). > | 2: In loop_apply(n, do.ply) : > | Removed 1 rows containing missing values (position_stack). > | 3: In loop_apply(n, do.ply) : > | Removed 3 rows containing missing values (position_stack). > | null device Those messages come from plyr, which ggplot2 uses. [snip] > > In any case, Org Babel seems to be behaving correctly. > > I've had this code around for years and have run it without problem many > hundreds of times. > > Is ess a potential source of the problem? I upgraded that recently. > I don't think so. I'd rewrite the src block with save.image(file="setup-for-ggplot.RData") before the graphics commands. Restart emacs and execute the src block. Start a fresh R session, then type load("setup-for-ggplot.RData") and type/paste in all the graphics commands and see what happens. If the error repeats and you can verify that each object is as you expected it to be, then this is not an Org mode problem. HTH, Chuck