From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OaiUHG4XGWHbKgAAgWs5BA (envelope-from ) for ; Sun, 15 Aug 2021 15:32:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id yO25F24XGWHFEAAAB5/wlQ (envelope-from ) for ; Sun, 15 Aug 2021 13:32:30 +0000 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 A918F2013 for ; Sun, 15 Aug 2021 15:32:29 +0200 (CEST) Received: from localhost ([::1]:50824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFGFX-0005Hk-Sj for larch@yhetil.org; Sun, 15 Aug 2021 09:32:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFGEr-0005HL-Jc for emacs-orgmode@gnu.org; Sun, 15 Aug 2021 09:31:45 -0400 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]:35745) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mFGEp-0004Gg-Hf for emacs-orgmode@gnu.org; Sun, 15 Aug 2021 09:31:45 -0400 Received: by mail-lf1-x136.google.com with SMTP id i28so2447048lfl.2 for ; Sun, 15 Aug 2021 06:31:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/r8WD4oEHCSkKrHIAmwJJ3oW9T+WFcUvbZRsOoqGG80=; b=AhcHQ+PhHRqDlLyX5Az6Vb9WBWAD/5J8smwhEluZ0OUTvGkkeTSAPEBvmNY73REYoL R4+irs4ltZNsWuigcgKVlL5HdcZt4op8khzprqUCjsBBYEvTRspwiU9Y+CnWW371HjhE u5keSPAlZeiCTJuoGZoXN6GVoP2A0575QGSTxGaHBgD3YApLrQDQmTaXJPUHiMG2WJPU i69uGR8eUt79DLcqAEbf5dfP83j1PqnesrBeiFATRrKnr/8hufYWh0mlI2JcCWKLZ9bm 2yeWciJESEWWVCj1z8HIHAhnWLE1Oj2g0Jaih6vA4sS3M8vwcEkkNrZNhSVh1FnkZl+T S6rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/r8WD4oEHCSkKrHIAmwJJ3oW9T+WFcUvbZRsOoqGG80=; b=FdwOC/vZneiDveLBaN8rtUy88zcXms+tiWWfp/UKjE0F3FsMaH/0hDneEnx8wIW6Ao M8rGJWm1R/dVzqhuCtEnNJrgBQMyHe9FwIvSl8iK6WMeSMN8SU51jMe4Gk3q7qhdvvmc EObeRhqPSFuiCwo6KbwoIK9CpRJaXkU2/bLF2VuD7if7PbwxBwPytclLj6Yk94t5ODFq fIP7TWJJo8J6NTYvi+iV3qficVmi+eHjvcj/Wb3Hwk6R5CVmNVUTiEr0yUT3Iu1Xjqvw iERK4rlpSMFwSzmz7al7Mo8AD2oNylnpNvyzbWn7ahKzHvvvmpdM29hUF2dQZN0tsrFQ 4lIQ== X-Gm-Message-State: AOAM531+R0ZNtqZA1/jEczIVeOWVAsdjgLYMgIVpbl42psJwARdjeGeG Gqk5rUh2ozHAJ14PRBXlPUImqiTNkugCNpOSUJI= X-Google-Smtp-Source: ABdhPJxpX0Dcs1JiJmXeJd47RyWE4Unfr33P8kAOmmDyBUoSZY/TMm8TngtccE2a/aNJZ+ZOnwl4XbYnthYkeS30Zgo= X-Received: by 2002:a05:6512:1116:: with SMTP id l22mr8425142lfg.315.1629034301328; Sun, 15 Aug 2021 06:31:41 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pedro Bruel Date: Sun, 15 Aug 2021 10:31:30 -0300 Message-ID: Subject: Re: Plotting with R To: Roger Mason Content-Type: multipart/alternative; boundary="000000000000db8f6005c9991a47" Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=pedro.bruel@gmail.com; helo=mail-lf1-x136.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629034350; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=/r8WD4oEHCSkKrHIAmwJJ3oW9T+WFcUvbZRsOoqGG80=; b=fFKWwfgbI63EjTimik3qfOTHzrDnPOHusEiRYfJbAtqOYwGKlPpZ3liyhj68FnhTe2J190 XmD/Np9kEincZrgCHJzoan0R8ccl2p6vd44p0rpG28UyExA51lzlKmhJNiFuYXSJaeel2w xeWafNBwTlcSLgzQ1s3cZMjkxQw0ZJWNz1s2lYKBox9iJaKg61Rds3uRe9eTPbf+ozsFkJ oVPebj71auIm4lmEOyszbRtPyKODB1NGppgjHG75EtYFYRLlkw6cWRJd5CsomD8T8hfqG3 MY4Dk35znaPuR7/nzPXlgXG6dVO5TejWVXJUlkiloW70hbx7PVqwhdU+P3R89Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629034350; a=rsa-sha256; cv=none; b=s1Z7BTCnfOfGLMPbRaO7ox4FObSFbmrYL6HwmsXd203ie+Avs0cD6G3JNcSUUGJahHUDZk eeDxZDuRaQQaGVteR1f3wGSHyT+bMjD1xAiOpIAKyaBU6R1IUJCOXoYWw9QUiEsCBBuVQt QnLDidI5ZnUntrPUxQjJowhqNMnfRD9V0vUY6ROPo9vfsnsN1o7G0Yg1VpfqPOfraSH0Mw ejYA+rG905nZEgVej3+soEC9p/nnmSM74ag3TXxGJenM6zPOEhpoU9VMdXDkGzsUotVhBr X/6JD4CioDuYq8Tck4+WmpDIClTBVFFN//WnF3yHc03nurTO20yVEfRB/wHp3A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=AhcHQ+Ph; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=AhcHQ+Ph; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: A918F2013 X-Spam-Score: -3.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0UclJElnlw2p --000000000000db8f6005c9991a47 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Roger, There's a typo on your source block header, it should be "output graphics", this would probably produce the output you're getting now. Thanks, Pedro Le dim. 15 ao=C3=BBt 2021 =C3=A0 10:17, Roger Mason a =C3= =A9crit : > Hello, > > I want graphics output from R: > > #+begin_src R :results output grahics file :file coa_vs_a.pdf :exports > results > library(tidyverse) > library(RPostgreSQL) > drv <- dbDriver("PostgreSQL") > con <- dbConnect(drv, user=3D"rmason",dbname=3D"test") > rs <- dbSendQuery(con,"with CTE as (select > split_part(split_part(lattice_out, E'\n', 13), ' ', 18) as c, > split_part(split_part(lattice_out, E'\n', 11), ' ', 11) as a > from results where timestamp like '20210814-071%' order by a) > select cast(a as double precision), cast(c as double precision)/ cast(a > as float) as coa from CTE;") > df <- fetch(rs) > theplot <- ggplot(df,aes(x=3Da,y=3Dcoa)) + geom_point() > theplot > #+end_src > > What I expect is a file 'coa_vs_a.pdf' on my filesystem & a link to it > in the org buffer. What I get is a file 'Rplots.pdf' and an empty file > 'coa_vs_a.pdf' with a link to the latter in the org buffer. > > I've searched this topic and I _think_ the invocation above, one of many > I've tried, should work. > > GNU Emacs 27.2 (build 1, amd64-portbld-freebsd11.4, X toolkit, cairo > version 1.16.0, Xaw3d scroll bars) > > Org mode version 9.2.3 (release_9.2.3-390-gfb5091 @ > /home/rmason/.emacs.d/org-git/lisp/) > > Thanks for your help. > > Roger > > --000000000000db8f6005c9991a47 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Roger,

There's a typo on your source block header, it should be "outpu= t graphics", this would probably produce the output you're getting= now.

Thanks,
Pedro


Le dim. 15 ao=C3=BBt 2021 =C3=A0 10:17, Roger Mason &= lt;rmason@mun.ca> a =C3=A9crit=C2= =A0:
Hello,

I want graphics output from R:

#+begin_src R :results output grahics file :file coa_vs_a.pdf :exports resu= lts
library(tidyverse)
library(RPostgreSQL)
drv <- dbDriver("PostgreSQL")
con <- dbConnect(drv, user=3D"rmason",dbname=3D"test"= ;)
rs <- dbSendQuery(con,"with CTE as (select split_part(split_part(la= ttice_out, E'\n', 13), ' ', 18) as c,
=C2=A0split_part(split_part(lattice_out, E'\n', 11), ' ', 1= 1) as a
=C2=A0from results where timestamp like '20210814-071%' order by a)=
=C2=A0select cast(a as double precision), cast(c as double precision)/ cast= (a as float) as coa from CTE;")
df <- fetch(rs)
theplot <- ggplot(df,aes(x=3Da,y=3Dcoa)) + geom_point()
theplot
#+end_src

What I expect is a file 'coa_vs_a.pdf' on my filesystem & a lin= k to it
in the org buffer.=C2=A0 What I get is a file 'Rplots.pdf' and an e= mpty file
'coa_vs_a.pdf' with a link to the latter in the org buffer.

I've searched this topic and I _think_ the invocation above, one of man= y
I've tried, should work.

GNU Emacs 27.2 (build 1, amd64-portbld-freebsd11.4, X toolkit, cairo
version 1.16.0, Xaw3d scroll bars)

Org mode version 9.2.3 (release_9.2.3-390-gfb5091 @
/home/rmason/.emacs.d/org-git/lisp/)

Thanks for your help.

Roger

--000000000000db8f6005c9991a47--