From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Hannon Subject: Evaluation of R code block depends on case of keywords??? Date: Fri, 19 Aug 2011 15:59:04 -0700 (PDT) Message-ID: <1313794744.82205.YahooMailNeo@web161913.mail.bf1.yahoo.com> Reply-To: Michael Hannon Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0-135029788-1313794744=:82205" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:45491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuY1s-0004jl-Uy for emacs-orgmode@gnu.org; Fri, 19 Aug 2011 18:59:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QuY1r-00011b-Ff for emacs-orgmode@gnu.org; Fri, 19 Aug 2011 18:59:08 -0400 Received: from nm26.bullet.mail.bf1.yahoo.com ([98.139.212.185]:32532) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QuY1r-0000zE-Ah for emacs-orgmode@gnu.org; Fri, 19 Aug 2011 18:59:07 -0400 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: Org-Mode List --0-135029788-1313794744=:82205 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Greetings.=A0 I happened to notice that in evaluating R source-code blocks = in an=0AOrg-Mode file I got some cruft from my .Rprofile in the output on s= ome=0Aoccasions but not on others.=0A=0ATo my surprise, it appears that the= CASE of the keywords on the BEGIN_SRC line=0Aaffects the output.=A0 Please= see the appended for a simple example.=0A=0AI haven't been able to find th= is behavior documented any place, but of course=0Ait's possible I just miss= ed it.=0A=0ACan somebody confirm/deny that Org-Mode is SUPPOSED to behave t= his way?=0A=0AThanks,=0A=0A-- Mike=0A=0A=0A* Mike's test of UPPER CASE keyw= ords=0A=0A#+BEGIN_SRC R :RESULTS output :EXPORTS both=0A=0A=A0=A0=A0 x <- r= norm(5)=0A=0A#+END_SRC=0A=0A#+results:=0A|=A0=A0 -1.78820283900565 |=0A|=A0= -0.469227269149123 |=0A|=A0=A0 -0.92353467915834 |=0A| -0.0831621941877021= |=0A|=A0=A0=A0 -1.5583681234565 |=0A=0A=0A=0A* Mike's test of lower case k= eywords=0A=0A#+BEGIN_SRC R :results output :exports both=0A=0A=A0=A0=A0 x <= - rnorm(5)=0A=0A#+END_SRC=0A=0A#+results:=0A: =0A: =0A: All ready to go...= =0A: =0A: Fri Aug 19 15:46:15 2011 =0A: Hasta la vista! --0-135029788-1313794744=:82205 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Greetings.  I happened t= o notice that in evaluating R source-code blocks in an
Org-Mode file I g= ot some cruft from my .Rprofile in the output on some
occasions but not = on others.

To my surprise, it appears that the CASE of the keywords = on the BEGIN_SRC line
affects the output.  Please see the appended = for a simple example.

I haven't been able to find this behavior docu= mented any place, but of course
it's possible I just missed it.

C= an somebody confirm/deny that Org-Mode is SUPPOSED to behave this way?
<= br>Thanks,

-- Mike


* Mike's test of UPPER CASE keywords
#+BEGIN_SRC R :RESULTS output :EXPORTS both

   = x <- rnorm(5)

#+END_SRC

#+results:
|   -1.78= 820283900565 |
|  -0.469227269149123 |
|   -0.92353467915834 |
| -0.0831621941877021 |
|    -1.5= 583681234565 |



* Mike's test of lower case keywords

#= +BEGIN_SRC R :results output :exports both

    x <= - rnorm(5)

#+END_SRC

#+results:
:
:
: All ready to= go...
:
: Fri Aug 19 15:46:15 2011
: Hasta la vista!

--0-135029788-1313794744=:82205-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: Evaluation of R code block depends on case of keywords??? Date: Fri, 19 Aug 2011 13:36:46 -1000 Message-ID: References: <1313794744.82205.YahooMailNeo@web161913.mail.bf1.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:48091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuYcY-0006Zz-F0 for emacs-orgmode@gnu.org; Fri, 19 Aug 2011 19:37:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QuYcT-0006kN-7x for emacs-orgmode@gnu.org; Fri, 19 Aug 2011 19:37:02 -0400 Received: from oproxy3-pub.bluehost.com ([69.89.21.8]:45130) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QuYcT-0006ii-1E for emacs-orgmode@gnu.org; Fri, 19 Aug 2011 19:36:57 -0400 In-Reply-To: <1313794744.82205.YahooMailNeo@web161913.mail.bf1.yahoo.com> (Michael Hannon's message of "Fri, 19 Aug 2011 15:59:04 -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: Michael Hannon Cc: Org-Mode List Michael Hannon writes: > Greetings.=C2=A0 I happened to notice that in evaluating R source-code bl= ocks in an > Org-Mode file I got some cruft from my .Rprofile in the output on some > occasions but not on others. > > To my surprise, it appears that the CASE of the keywords on the BEGIN_SRC= line > affects the output.=C2=A0 Please see the appended for a simple example. > > I haven't been able to find this behavior documented any place, but of co= urse > it's possible I just missed it. > > Can somebody confirm/deny that Org-Mode is SUPPOSED to behave this way? > > Thanks, > > -- Mike > > > * Mike's test of UPPER CASE keywords > > #+BEGIN_SRC R :RESULTS output :EXPORTS both > > =C2=A0=C2=A0=C2=A0 x <- rnorm(5) > > #+END_SRC > > #+results: > |=C2=A0=C2=A0 -1.78820283900565 | > |=C2=A0 -0.469227269149123 | > |=C2=A0=C2=A0 -0.92353467915834 | > | -0.0831621941877021 | > |=C2=A0=C2=A0=C2=A0 -1.5583681234565 | > > > > * Mike's test of lower case keywords > > #+BEGIN_SRC R :results output :exports both > > =C2=A0=C2=A0=C2=A0 x <- rnorm(5) > > #+END_SRC > > #+results: > :=20 > :=20 > : All ready to go... > :=20 > : Fri Aug 19 15:46:15 2011=20 > : Hasta la vista! Hi Mike, I believe what is happening is that :RESULTS and :EXPORTS are not recognized, so :results (the correct header argument) defaults to value. hth, Tom --=20 Thomas S. Dye http://www.tsdye.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Hannon Subject: Re: Evaluation of R code block depends on case of keywords??? Date: Fri, 19 Aug 2011 23:32:34 -0700 (PDT) Message-ID: <1313821954.98941.YahooMailNeo@web161917.mail.bf1.yahoo.com> References: <1313794744.82205.YahooMailNeo@web161913.mail.bf1.yahoo.com> Reply-To: Michael Hannon Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1050820905-1313821954=:98941" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:44092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Quf6j-0002KN-A6 for emacs-orgmode@gnu.org; Sat, 20 Aug 2011 02:32:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Quf6h-0003aY-SD for emacs-orgmode@gnu.org; Sat, 20 Aug 2011 02:32:37 -0400 Received: from nm23.bullet.mail.bf1.yahoo.com ([98.139.212.182]:45947) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Quf6h-0003aS-MS for emacs-orgmode@gnu.org; Sat, 20 Aug 2011 02:32:35 -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: Org-Mode List --0-1050820905-1313821954=:98941 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable =0A>> Greetings.=A0 I happened to notice that in evaluating R source-code b= locks in=0A>> an Org-Mode file I got some cruft from my .Rprofile in the ou= tput on some=0A>> occasions but not on others.=0A>>=0A>> To my surprise, it= appears that the CASE of the keywords on the BEGIN_SRC=0A>> line affects t= he output.=A0 Please see the appended for a simple example.=0A>>=0A>> I hav= en't been able to find this behavior documented any place, but of=0A>> cour= se it's possible I just missed it.=0A>>=0A>> Can somebody confirm/deny that= Org-Mode is SUPPOSED to behave this way?=0A>>=0A>> Thanks,=0A>>=0A>> -- Mi= ke=0A>>=0A>>=0A>> * Mike's test of UPPER CASE keywords=0A>>=0A>> #+BEGIN_SR= C R :RESULTS output :EXPORTS both=0A>>=0A>>=A0=A0=A0=A0 x <- rnorm(5)=0A>>= =0A>> #+END_SRC=0A>>=0A>> #+results:=0A>> |=A0=A0 -1.78820283900565 |=0A>> = |=A0 -0.469227269149123 |=0A>> |=A0=A0 -0.92353467915834 |=0A>> | -0.083162= 1941877021 |=0A>> |=A0=A0=A0 -1.5583681234565 |=0A>>=0A>>=0A>>=0A>> * Mike'= s test of lower case keywords=0A>>=0A>> #+BEGIN_SRC R :results output :expo= rts both=0A>>=0A>>=A0=A0=A0=A0 x <- rnorm(5)=0A>>=0A>> #+END_SRC=0A>>=0A>> = #+results:=0A>> :=0A>> :=0A>> : All ready to go...=0A>> :=0A>> : Fri Aug 19= 15:46:15 2011=0A>> : Hasta la vista!=0A>=0A> Hi Mike,=0A=0A> I believe wha= t is happening is that :RESULTS and :EXPORTS are not=0A> recognized, so :re= sults (the correct header argument) defaults to value.=0A> =0A> hth,=0A> To= m=0A> =0A> -- =0A> Thomas S. Dye=0A> http://www.tsdye.com=0A=0AThanks, Tom.= =A0 I think your explanation is correct.=A0 The manual page:=0A=0A=A0=A0=A0= http://orgmode.org/manual/Specific-header-arguments.html#Specific-header-a= rguments=0A=0Adoes indeed show all of the arguments in lower case.=A0 I had= seen BEGIN_SRC and=0Abegin_src used interchangeably and so assumed that sa= me latitude applied to=0Athe keywords.=A0 And I have a slight preference fo= r putting keywords in upper=0Acase and values in lower case, just to distin= guish one class of things from=0Athe other.=A0 My bad.=0A=0A-- Mike --0-1050820905-1313821954=:98941 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable

>> Gre= etings.  I happened to notice that in evaluating R source-code blocks = in
>> an Org-Mode file I got some cruft from my .Rprofile in the o= utput on some
>> occasions but not on others.
>>
>&= gt; To my surprise, it appears that the CASE of the keywords on the BEGIN_S= RC
>> line affects the output.  Please see the appended for a= simple example.
>>
>> I haven't been able to find this b= ehavior documented any place, but of
>> course it's possible I jus= t missed it.
>>
>> Can somebody confirm/deny that Org-Mod= e is SUPPOSED to behave this way?
>>
>> Thanks,
>&g= t;
>> -- Mike
>>
>>
>> * Mike's test of= UPPER CASE keywords
>>
>> #+BEGIN_SRC R :RESULTS output :EXPORTS both
>>
>>     x <= ;- rnorm(5)
>>
>> #+END_SRC
>>
>> #+res= ults:
>> |   -1.78820283900565 |
>> |  -0.= 469227269149123 |
>> |   -0.92353467915834 |
>>= | -0.0831621941877021 |
>> |    -1.5583681234565 |=
>>
>>
>>
>> * Mike's test of lower cas= e keywords
>>
>> #+BEGIN_SRC R :results output :exports b= oth
>>
>>     x <- rnorm(5)
>= ;>
>> #+END_SRC
>>
>> #+results:
>> = :
>> :
>> : All ready to go...
>> :
>> = : Fri Aug 19 15:46:15 2011
>> : Hasta la vista!
>
> Hi= Mike,

> I believe what is happening is that :RESULTS and :EXPORT= S are not
> recognized, so :results (the correct header argument) defaults to value.
>
> hth,
> Tom
> > --
> Thomas S. Dye
> http://www.tsdye.com

Thanks,= Tom.  I think your explanation is correct.  The manual page:
=
    http://orgmode.org/manual/Specific-header-arguments.= html#Specific-header-arguments

does indeed show all of the arguments= in lower case.  I had seen BEGIN_SRC and
begin_src used interchang= eably and so assumed that same latitude applied to
the keywords.  A= nd I have a slight preference for putting keywords in upper
case and val= ues in lower case, just to distinguish one class of things from
the othe= r.  My bad.

-- Mike


--0-1050820905-1313821954=:98941--