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--