From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id aMaUNwh4YGZLdgEAe85BDQ:P1 (envelope-from ) for ; Wed, 05 Jun 2024 16:36:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id aMaUNwh4YGZLdgEAe85BDQ (envelope-from ) for ; Wed, 05 Jun 2024 16:36:57 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=OkDQIUI0; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1717598216; a=rsa-sha256; cv=none; b=djNc+yOT3h8wpieYiJ2fFC/zp1oC50Nsf8OncnuCDyiDVSEqzIv/SI3tD3AZYTtuNUgzD7 q8BLXLEqcoyODeoWO9dszri7mjAuFqDiaKEEUFS2QU6iKA8nYXl4AwIh218i1MGzUkb3H/ JGn6xsOugLtQyDv7RYQfMZviI1/isNDA1Ouf8XdixSXbulOeHXLHnHMx2jBX5OX2eOhCmK /tUm7/9z6gq1o4l+wi9ASCZm1wflpLJFurSDUs/r0zUSY7HU9jWLajYlYZrRNbHwGpCZWS wDctGusNX90rPDPqOVYkTI6eMWXZhfdrK8B5DS2Qyy51KHrUmmiL2bnMpq9iKg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=OkDQIUI0; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1717598216; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=HeLednZle+h2c/087xguhAewBR+jXFwgygZ9Ps+cPtY=; b=ta9AjGB5cygrCwUDfEsWfaWeEjugyug/Le1Ds7GufwNTtFYMAnzB//invNdJT3dgTeTUkR N4Y/ptJUn5bn3AFVkAX5xgKQ8XQg0L6j3ZGon04KChP7pLQExiUjc15SgjG9xZwp+SOOiO WkgSZKW0ccuZtViMk3K+0uW1ZdMb4tugvT2+ipiewn4jx7xpDHywKs78a/Ra/cAz9yV3D0 yFfPPAxW3aCc/TyTdHlostunnPwIej/DSFWwmnQCI0yW/zUMvRTetMSOgKHLaOJS3KI48M ne6IcS3kEiNPlDlWaP+eZlsME4NtP7Vz+OpJOCe1gaAR5B15qO4yoKvuhwkG7g== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C90B06C4D7 for ; Wed, 5 Jun 2024 16:36:56 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sErkI-0004vO-MI; Wed, 05 Jun 2024 10:36:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sE82d-0005Ed-J5 for emacs-orgmode@gnu.org; Mon, 03 Jun 2024 09:48:03 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sE82b-00052H-27 for emacs-orgmode@gnu.org; Mon, 03 Jun 2024 09:48:02 -0400 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a6265d3ba8fso432918366b.0 for ; Mon, 03 Jun 2024 06:48:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717422478; x=1718027278; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=HeLednZle+h2c/087xguhAewBR+jXFwgygZ9Ps+cPtY=; b=OkDQIUI0vHoXB8peXgHhQILElqOMbMh0XjTydey5SYrNTgcUoEWKnCon1G8HIWxGar yZrAWhp/E743ctcXFlJ3PkLlbGjtsw8s2X3wPrh0KmfiTj3meAaqKYW1w1KAJOJgTA57 YPJMzdm7DzddIpLGc0qSDEHnN0aHIQ83N0EKXNMHWmmrNe6rehE1jpaEE8EssUAyWgA3 HjOUCf7WVGcC0g6xpPV5hmIQq3jycIE0xE5s8oRwFDbiszv8g2SXYr/S3+jnbapr2IoF 0nF1ZjjMPq3isOMP3wTiWTxAaM2fzqimYdT5kyJGP/GxL084kZ4zvKqbw+Pryp1uC+A8 q7Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717422478; x=1718027278; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=HeLednZle+h2c/087xguhAewBR+jXFwgygZ9Ps+cPtY=; b=j2Wv3j4+L4Q+sGhGMI8E73kIyah0FlhVEO0WuWpeqFWGmjd9zpSKGI39+ncPZs5TYI tRwzTp7Wjk9WRpxS0j5S0OV9GcMIcgff9xJM+V0ZbXjb8Hp1/Eo2T961YIs+WS9FaAKi nePDfizUb/rD+Pk/jOmMhYq8/knrtx5cX0AoXpvoWiz/iuRHIdytXrOOKkHk8jT3P5/t Wo4nhKmMJt+flLM7pqbN1k7Cw/IqWrRWfzlVRLS7XdMWWlgldc7rnAZabkXjkvFoFnuP ZGBsAfvzjajPRiQi15M1t3Bd4GTcLMmyiRHcB0JksNW+cJWFRdWbG9BfQSA0nikjndp0 KfLw== X-Gm-Message-State: AOJu0YwfwS+mP+nkfMsi2kDksjLiFzhS9D320PBJnCkHPxCBXHT3bnFF JKn6V+fm6VLy8jkHUbiPZ8aiGGngqPghUsEn4ZyIa0kLMFzzOcH/6+yba+bo1hrsqLXBvxUY6Sv 0iYOeGbAUKDV0A3Pp1IzgKvHy1hXhUfXP X-Google-Smtp-Source: AGHT+IFUix512tzm/sYtKwnIpySKCnTu7l2tX5hDnSTuThNBQFFSYURYcdB+0V4wC9Uw/MzvThS3f59GTtXzuvJ6s7w= X-Received: by 2002:a17:907:6d02:b0:a68:ed0b:8924 with SMTP id a640c23a62f3a-a68ed0b89b4mr330057966b.16.1717422477459; Mon, 03 Jun 2024 06:47:57 -0700 (PDT) MIME-Version: 1.0 From: Giuseppe Pagnoni Date: Mon, 3 Jun 2024 15:47:45 +0200 Message-ID: Subject: Output of R code block: only text or plot but not both? And only one "result" can be output? To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000b2c71a0619fc9425" Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=gpagnoni@gmail.com; helo=mail-ej1-x632.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 05 Jun 2024 10:36:09 -0400 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: C90B06C4D7 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -7.67 X-Spam-Score: -7.67 X-TUID: Bycg5ljYfRrP --000000000000b2c71a0619fc9425 Content-Type: text/plain; charset="UTF-8" Hi, I am trying to have an R code block output both the results of a numerical expression AND a plot, but if I set up the header arguments to display the plot, the numerical outcome is not displayed. A simple example: #+begin_src R :file example.png :results output graphics file x <- rnorm(100) print(mean(x)) hist(x) #+end_src Here I get the histogram plot back in the buffer, but NOT the result of "print(mean(x))". Is it not possible to get both? Furthermore, what if I wanted to display *two* or more plots that get built by the code, for instance: #+begin_src R :file example.png :results output graphics file x <- rnorm(100) print(mean(x)) hist(x) hist(x^2) #+end_src Here, only the last plot gets displayed. Is it not possible to display more than 1 plot? many thanks in advance for any help giuseppe -- Giuseppe Pagnoni Dip. Scienze Biomediche, Metaboliche e Neuroscienze Sezione Fisiologia e Neuroscienze Univ. di Modena e Reggio Emilia Via Campi 287 I-41125 Modena, Italy Tel: +39-059-205-5742 Fax: +39-059-205-5363 --000000000000b2c71a0619fc9425 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I am trying to have an R code block= output both the results of a numerical expression AND a plot, but if I set= up the header arguments to display the plot, the numerical outcome is not = displayed.=C2=A0 A simple example:

#+begin_src R := file example.png :results output graphics file
=C2=A0 x <- rnorm(100)=
=C2=A0 print(mean(x))
=C2=A0 hist(x)
#+end_src

=
Here I get the histogram plot back in the buffer, but NOT the result o= f "print(mean(x))".=C2=A0 =C2=A0Is it not possible to get both?

Furthermore, what if I wanted to display *two* or m= ore plots that get built by the code, for instance:

#+begin_src R :file example.png :results output graphics file
=C2=A0 x= <- rnorm(100)
=C2=A0 print(mean(x))
=C2=A0 hist(x)
=C2= =A0 hist(x^2)
#+end_src

Here, only the last plo= t gets displayed.=C2=A0 Is it not possible to display more than 1 plot?

many thanks in advance for any help

giuseppe
--
=
Giuseppe Pagnoni
Dip. Scienze Biomediche, Metaboliche e Neuroscienze<= br>Sezione Fisiologia e Neuroscienze
Univ. di Modena e Reggio Emilia
= Via Campi 287
I-41125 Modena, Italy
Tel: +39-059-205-5742
Fax: +39= -059-205-5363

--000000000000b2c71a0619fc9425--