[Orgmode] Re: Babel - simple getting started problem

2009-12-08 Thread Sébastien Vauban
Hi Dan,

Dan Davison wrote:

 * meantest
 #+srcname: calcmean(data=trial)
 #+begin_src R
 mean(data)
 #+end_src

 #+results: calcmean
 : 6.5

 or alternative syntax

 #+begin_src R :var data=trial
 mean(data)
 #+end_src

 #+results:
 : 6.5

As I am as well *learning* Org-babel and its satellites (R, GNU screen, etc.),
I'm wondering if there is one of the two above syntaxes that gets more chance
to be the survivor -- would there be a war between both ;-)

I mean: I'm not yet attached to any of the two. Which one should I use better,
ensuring more portability over time?  Or are these both totally equivalent,
and will it stay so for the coming years?

Best regards,
  Seb

-- 
Sébastien Vauban



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [babel] R questions

2009-12-08 Thread Sébastien Vauban
Hi Dan,

Dan Davison wrote:
 Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 I have this table generated by a script:

 #+results: abc2008
 | 2008/1  | -78.59 |   1627.24 |
 | 2008/2  | -80.17 |700.33 |
 | 2008/3  | -80.17 | 879.8 |
 | 2008/4  | -80.17 | -25823.17 |
 | 2008/5  | -80.17 |   3570.75 |
 | 2008/6  | -81.77 |2377.8 |
 | 2008/7  | -81.77 |2889.4 |
 | 2008/8  | -81.77 |   2612.92 |
 | 2008/9  | -81.77 |   1585.21 |
 | 2008/10 |  -83.4 |   1561.42 |
 | 2008/11 |  -83.4 |   2189.17 |
 | 2008/12 |  | |

 I want to draw the 12 months with the values side by side.

 Problem #1: the  in the last line hinder the generation of the graph.
 Format error.

 Missing values in R are represented by the value NA. If you change the last
 line of your table to

 | 2008/12 | NA |NA |

 then it works [1], [2], [3].

 [1] Note no quotes around NA here. You asked a good question about quoting
 in org-babel; it will be answered.

OK.


 [2] I guess one could potentially think about dealing with missing values
 more explicitly in org-babel. E.g. there could be a header arg
 specifying what values are to be treatyed as missing. Nothing like that
 exists currently.

I guess such a feature would be required on the long term. Of course, even
specifying what would be the needed behavior is already difficult, I think.
One must have good knowledge of the multiple languages and environments, and
try to abstract the best behavior out of these.

Side note -- I know, for example, that there is an option in Access to let it
consider the empty string ('') as the NULL value, or not. Clear.

But what's a NA value in general?  Is 0 always a meaningful value as
numeric?  Context-sensitive...

Side question -- You talked of some way to remember the bugs or features to be
added to Org. Same question here: where will these little things be added in
order to avoid forgetting them?  Is it in one of the Worg documents itself?


 [3] You might think that an alternative would be to do something like this
 in R

 abc[abc == \\] - NA

 but the trouble is that with those double quotes present, R will interpret
 the column as containing character data rather than numeric, and things will
 not be pretty.

I believe you...


 #+srcname: expenses-bar-plot(abc = abc2008)
 #+begin_src R :results file :file abc2008.pdf
 barplot(abc[,3], col = red, main = Profit and Loss 2008, las = 1, 
 xlab
 = Months, ylab = EUR)
 #+end_src

 Problem #2: I don't know how to ask for drawing the 2 columns. I've tried

 OK, so one point that is arguably relevant to this mailing list is that when
 org tables are read into R, the object that is created in R is a *data
 frame*. Not a matrix. (A data frame can have columns of different types;
 matrices are all one type). [4]

 [4] org-babel uses orgtbl-to-tsv followed by read.table() to convert the
 org table into a data.frame in R. A source of much confusion with
 R-beginners is that by default, read.table converts character columns into
 the *factor* data type. Note that org-babel currently uses 'as.is=TRUE' when
 calling read.table and therefore does *not* convert to factor. This may
 avoid some confusion among users but is memory-inefficient and misses out on
 other advantages of factors.

 So to solve your problem, you'd need to read the description of the height
 argument in the help page for barplot (?barplot), noting that it says
 either a vector or matrix, and also noting that it says that bars
 correspond to columns (not rows), thus realising that you need to explicitly
 convert the relevant columns of the data frame to a matrix and then
 transpose.

 However, your two columns have rather different magnitude values and so are
 not very well suited for plotting on the same scale. Below I rescaled the
 first column by a factor of 20 so you can at least see the bars.

 #+srcname: expenses-bar-plot-two-columns(abc = abc2008)
 #+begin_src R :file abc2008.png
   ## select the two columns, convert to matrix, transpose and rescale top
   ## row.
   x - t(as.matrix(abc[,2:3])) * c(20,1)
   barplot(x, col = rep(c(red,blue), ncol(x)), main = Profit and Loss
   2008, las = 1, xlab= Months, ylab = EUR, beside=TRUE)
 #+end_src

Thanks a lot for the enlightened explanation, and the correction to be brought
to the R code.

Best regards,
  Seb

-- 
Sébastien Vauban



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [babel] R questions

2009-12-08 Thread Sébastien Vauban
Hi Dan and Eric,

I have a side question, but I think this is of general interest for others as
well.

I almost don't know GnuPlot neither R -- yes, before seeing the light, I used
Excel for all my graphs.

So, my question is: for typical small plots (piecharts and barplots), is there
any Org-babel reason that would advocate for doing it in one of the two above
language preferably than in the other one?

Reasons could be better integration (for editing or (re-)generating the
graphs), simpler semantics (with NA values, for example), etc.

Best regards,
  Seb

-- 
Sébastien Vauban



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Latex export and label entries

2009-12-08 Thread d . tchin
Hi

Carsten Dominik carsten.dominik at gmail.com writes:

 
 Hi,
 On Dec 2, 2009, at 2:51 PM, d.tchin at voila.fr wrote:
 
 
  Hi,
 
  I use org-export-latex to create latex powerdot
  file. I make adaptation of template defined for
  beamer class and it works quite well.
 
  I have a problem I would like to submit :
 
  By default in each section or slide (frame) environment,
  there is a label added by default. This instruction
  is not recognized by powerdot class. Is there a way
  to prevent org-export-latex function to add such label
  entries ?
 
 a work-around would be to add this to your powerdot definition of org- 
 export-latex-classes:
 
 \def\label#1{}
 

Thank you for the advice. I add the instruction you suggest.
with org-export-latex-classes. In fact it work if this intruction
appears after \begin{document}. 
I have managed to add it before \begin{document} with 
org-export-latex-classes but not after . How could I make appear
this intruction only one time after \begin{document} ?

Regards




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [BUG] Code bloc after sublist isn't exported to LaTeX

2009-12-08 Thread Nicolas Girard
Hi,

the following sample document contains 3 code blocs ; only 2 of them
are properly exported to LaTeX.

#=
* Section

- A :: alpha

  - Aa

  - Bb

#+begin_src emacs-lisp
 (message This works)
#+end_src

  #+begin_src emacs-lisp
   (message This doesn't)
  #+end_src

- B :: beta

#+begin_src emacs-lisp
  (message This works)
#+end_src
#=

-- 
Nicolas


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [BUG] ':' whithin * markup incorrectly rendered in LaTeX

2009-12-08 Thread Nicolas Girard
Hi,

*BUG:* is incorrectly translated in LaTeX to
  \textbf{BUG:\}
It should be
  \textbf{BUG:}

-- 
Nicolas


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [babel] R questions

2009-12-08 Thread Thomas S. Dye

Aloha Sebasien,

On Dec 7, 2009, at 11:50 PM, Sébastien Vauban wrote:


But what's a NA value in general?  Is 0 always a meaningful value as
numeric?  Context-sensitive..



NA is a logical constant of length 1 which contains a missing value  
indicator.  Whether or not 0 is a meaningful value as numeric depends  
on your data and the questions you are asking of it.  You don't ask  
this question, but if I read this thread correctly and you are trying  
to workaround a data input problem with R in Org-babel, then replacing  
missing values with 0 in a numeric context to get around the Org-babel  
problem is NOT a good idea.


HTH,
Tom



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [BUG] ':' whithin * markup incorrectly rendered in LaTeX

2009-12-08 Thread Bill Powell
At Tue, 8 Dec 2009 16:56:46 +0100,
Nicolas Girard wrote:
 
 Hi,
 
 *BUG:* is incorrectly translated in LaTeX to
   \textbf{BUG:\}
 It should be
   \textbf{BUG:}
 
 -- 
 Nicolas
 

Yes, I've noticed this bug a lot. You will also have a similar problem with:

\fontsize{9}{11}

becoming

\fontsize{9}\{11\}

Thanks,
Bill Powell



 
 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode
 


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Using orgtbl-mode for editing tables in reStructured text

2009-12-08 Thread Johan Ekh
Hi all,
I'm using Sphinx to extract docstrings from my python code and create API
documentation
of my classes and methods. I like to have a small table at the top of each
class where all variables are listed.
It would be very useful to use the orgtbl-mode to create these tables but
the format used by orgtbl-mode
is slightly different from tables in reStructured text (which is used by
Sphinx).

Is there any way to make orgtbl-mode use the same format as reStructured
text? E.g. vertical separator lines
must start with +--- instead of |--- and some other small differences.

Best regards,

Johan
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Exporting non utf8 org documents

2009-12-08 Thread Francesco Pizzolante
Hi,

I have colleagues who are writing Org documents with latin-1 encoding and when
I export these documents to LaTeX I run into problems, because Org assumes
utf8.

Here's a little example:

--8---cut here---start-8---
#+LATEX_CLASS: article

* Ceci est un test

  Voici un petit texte rédigé en français.

* COMMENT Setup

# This is for the sake of Emacs.
# Local Variables:
# coding: iso-latin-1
# End:
--8---cut here---end---8---

The exportation to LaTeX gives the following result:

--8---cut here---start-8---
% Created 2009-12-08 mar. 17:10
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{amssymb}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{listings}

\title{org-french}
\author{Francesco Pizzolante}
\date{08 décembre 2009}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

\section{Ceci est un test}
\label{sec-1}


  Voici un petit texte rédigé en français.



\end{document}
--8---cut here---end---8---

When compiling, due to the \usepackage[utf8]{inputenc} directive, I get this
error:

ERROR: Package utf8x Error: MalformedUTF-8sequence.


In order to fix this issue, I see the following solutions:

- Would it be possible for Org to automatically get the coding system of the
  buffer and then generate the correct option for the inputenc package?

or

- Would it be possible to have a variable like #+CODING-SYSTEM: iso-latin-1
  which would be used to generate the correct option for the inputenc package?

Any other proposition or idea is welcome.

In addition, Org should use the `utf8x' option (instead of `utf8') which
enables to handle unbreakable spaces (useful in french).

Thanks.

Regards,
Francesco


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [babel] R questions

2009-12-08 Thread Dan Davison
Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 Hi Dan and Eric,

 I have a side question, but I think this is of general interest for others as
 well.

 I almost don't know GnuPlot neither R -- yes, before seeing the light, I used
 Excel for all my graphs.

 So, my question is: for typical small plots (piecharts and barplots), is there
 any Org-babel reason that would advocate for doing it in one of the two above
 language preferably than in the other one?

 Reasons could be better integration (for editing or (re-)generating the
 graphs), simpler semantics (with NA values, for example), etc.

Org-babel wants to support both languages as well as possible. So there
is no such purely org-babel reason; or if there is, there shouldn't be,
so tell us about it and we'll try to fix it.

With respect to graphics, I'm sure that each one has things it can do
better than the other (e.g. I get the impression that gnuplot is better
for 3D graphics).

But yes, if there was someone who (a) didn't know either language, and
(b) were limited in the amount of time they could devote to learning
computer languages, and (c) thought they might one day have some use for
some of the things that R can do and gnuplot can't, then I would suggest
that they start using R over gnuplot.

R is a fully-featured programming language with a very large amount of
numerical/statistical/scientific procedures available. (2094 add-on
packages currently listed at http://cran.r-project.org/). One wouldn't
normally compare R with gnuplot; more appropriate comparisons might be
to the scientific libraries for python, perl and C++, and to things like
Excel, SAS, and Matlab, Mathematica (although R is not a symbolic
mathematics engine).

Dan



 Best regards,
   Seb


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Big curly bracket

2009-12-08 Thread andrea

I have to write things like
f(x) = | 0 if x == 1
   | 1 otherwise
   
with the big curly bracket.
It's a common thing and I found in latex is like here
http://www.mathhelpforum.com/math-help/latex-help/59690-left-curly-brace.html
Using \left{ and \begin{gathered}
For some reasons anyway it doens't work.

This 
--8---cut here---start-8---
$\phi_{sum}(g1))(\bot) = (\phi_{sum}(g2))(\bot) =$ \newline
\begin{gathered}
1 if x  0 \\
\bot otherwise \\
\end{gathered}
--8---cut here---end---8---

doesn't to what I'd like it to do.
Any idea?



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Babel - importing a data file- missing header row

2009-12-08 Thread Graham Smith
I need a bit of help importing a data file into orgmode/babel.

The import doesn't seem to know about having a header row

#+srcname:woodland
#+begin_src R
read.table(/home/graham/Dropbox/College/BY4001/WoodlandData/BY4001WoodlandDataFinal.txt,header=TRUE)
#+end_src

#+resname: woodland
| V1.1  | v | 0 | 0 | 0 |  0 | 0 |  0 |  0 |  0 |  0 |  0 |  0 |
0 |  0 |  0 | 0 |  0 | 0 |  0 |  0 |  0 |  0 | 0 |  0 | 0 | 0 |  0 |
0 |  0 | 0 |  0 |  5 |  0 |  0 | 10 |  0 | 0 |  0 | 100 |  0 |  3 | B


But strangely if I change the command and run the names(woodland)
after the import, I get a table of variable names but no data. I'm not
sure if the data is there but hidden as I can't get any commands to
work on the woodland object.

* Woodland Data
#+srcname:woodland
#+begin_src R
woodland-read.table(/home/graham/Dropbox/College/BY4001/WoodlandData/BY4001WoodlandDataFinal.txt,header=TRUE)
names(woodland)
#+end_src

#+resname: woodland
| ID   |
| wood |
| Ajug.Rept|
| Ange.sylv|
| Brac.sylv|
| Brom.ramo|
| Care.pend|
| Care.remo|
| Care.sylv|
| Cirs.palu|
| Cory.avel|
| Desc.caes|
| Dryo.fili|
| Endy.non |
| Euph.amyg|

So it seems I already need some more help.

Graham


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] changing face (color) on tags-todo agenda headlines

2009-12-08 Thread Sullivan, Gregory (US SSA)
I'd like to process agenda headlines and apply face (color) to ones with given 
tags.

It seems like I should add a function to org-finalize-agenda-hook.  When that 
hook is invoked, how do I iterate over agenda headlines?

I thought I could use org-map-entries, on the current buffer, as follows:

(add-hook 'org-finalize-agenda-hook
  (lambda ()
 (message starting agenda-hook)
 (org-map-entries
  '(message hi)
  +highlight nil)))

But I never get hi despite there being agenda items with the highlight tag.

Any help would be much appreciated.
Thanks!

--Greg

--
Gregory T. Sullivan, Ph.D.
BAE Systems Advanced Information Technologies
6 New England Executive Park, Burlington, MA 01803
781-262-4553 (office),  978-430-3461 (cell)
gregory.sulli...@baesystems.com 




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Big curly bracket

2009-12-08 Thread Olivier Schwander
Le 08 Dec 2009 17:34, andrea a écrit:
 
 I have to write things like
 f(x) = | 0 if x == 1
| 1 otherwise

 with the big curly bracket.
 It's a common thing and I found in latex is like here
 http://www.mathhelpforum.com/math-help/latex-help/59690-left-curly-brace.html
 Using \left{ and \begin{gathered}
 For some reasons anyway it doens't work.
 
 This 
 --8---cut here---start-8---
 $\phi_{sum}(g1))(\bot) = (\phi_{sum}(g2))(\bot) =$ \newline
 \begin{gathered}
 1 if x  0 \\
 \bot otherwise \\
 \end{gathered}
 --8---cut here---end---8---
 
 doesn't to what I'd like it to do.
 Any idea?

No idea, did you try with \begin{cases}...\end{cases} ?

You can also use \left\{...\right followed by an array. 
   

Olivier 



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [babel] features request for Emacs Initialization

2009-12-08 Thread Jonathan Arkell
Doh.

Thanks for catching that mistake.


On 2009/12/8 1:28 AM, Sébastien Vauban wxhgmqzgw...@spammotel.com wrote:

Hi Jonathan,

Jonathan Arkell wrote:
 On 2009/12/7 12:31 AM, bluedian blue.d...@gmail.com wrote:

 For now, I use this basic snippet when defining emacs code block in my
 configuration files, JDL-Debug is a flag I put to true when I want to debug
 my Emacs configuration.

 # -*- mode: snippet -*-
 # name: code org for emacs configuration blocks
 # key: cemacs
 # --
 #+srcname: $1
 #+begin_src emacs-lisp
 (if JDL-Debug
  (message start $1))
 $2
 (if JDL-Debug
  (message End $1))
 #+end_src

 Why not use a macro?  That is one of the great things about lisp:

 (defmacro JDL-Debug (section rest code)
   `(if JDL-Ddebuging
  (progn
(message (concat start  ,section))
,code
(message (concat end  ,section)

 (I haven't tested it, but that should work.)

Not the same semantics, here: you don't execute the code unless the debug flag
is set to `t'. In his case, the debug flag just adds (or not) messages in the
echo area.

Apart from that little difference, yes, I guess using macros is an excellent
idea.

Best regards,
  Seb

--
Sébastien Vauban



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode



The information contained in this message is confidential. It is intended to be 
read only by the individual or entity named above or their designee. If the 
reader of this message is not the intended recipient, you are hereby notified 
that any distribution of this message, in any form, is strictly prohibited. If 
you have received this message in error, please immediately notify the sender 
and delete or destroy any copy of this message.
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Latex export and label entries

2009-12-08 Thread Carsten Dominik


On Dec 3, 2009, at 8:37 PM, d.tchin wrote:


Hi

Carsten Dominik carsten.dominik at gmail.com writes:



Hi,
On Dec 2, 2009, at 2:51 PM, d.tchin at voila.fr wrote:



Hi,

I use org-export-latex to create latex powerdot
file. I make adaptation of template defined for
beamer class and it works quite well.

I have a problem I would like to submit :

By default in each section or slide (frame) environment,
there is a label added by default. This instruction
is not recognized by powerdot class. Is there a way
to prevent org-export-latex function to add such label
entries ?


a work-around would be to add this to your powerdot definition of  
org-

export-latex-classes:

\def\label#1{}



Thank you for the advice. I add the instruction you suggest.
with org-export-latex-classes. In fact it work if this intruction
appears after \begin{document}.
I have managed to add it before \begin{document} with
org-export-latex-classes but not after . How could I make appear
this intruction only one time after \begin{document} ?


#+LaTeX: \def\label#1{}

HTH

- Carsten



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Insert link with foreign character - cannot save

2009-12-08 Thread Carsten Dominik

Hi Mattias,

thanks for telling us what worked.

If someone can figure out what is going on here, a FAQ entry would be  
MUCH appreciated.


- Carsten

On Dec 8, 2009, at 12:36 AM, Mattias Jämting wrote:


Hello again,

I've now got it to work. Not really sure why. This is what i did:

I removed

(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(prefer-coding-system 'utf-8-dos)

from my init.el

And replaced it with

(modify-coding-system-alist 'file \\.org\\' 'utf-8-dos)
(modify-coding-system-alist 'file \\.org_archive\\' 'utf-8-dos)

And everything works great! Thanks anyway.

/Mattias

Mattias Jämting, Jämting Web  Design
www.jamting.se | +46 (0)70 6760182



On Sun, Nov 22, 2009 at 02:32, Sebastian Rose  
sebastian_r...@gmx.de wrote:

Also, I can follow the link, that is created. It terribly ugly, but
working.



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


- Carsten





___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Notmuch: An emacs interface for fast global search and tagging of email

2009-12-08 Thread Carsten Dominik

Hi David,

please make sure to tell me when there is a final version of the stuff  
we should add to Org-mode.


Thanks!

- Carsten


On Dec 5, 2009, at 5:40 PM, David Bremner wrote:



For those of you interested in notmuch and org-mode, I have a
preliminary version of support for links from org-mode files to
notmuch.  Currently the following are working

* Supported by org-store-link
** Link to a thread
[[notmuch:thread:35471bef770cf624005d52a155bd140e][Email from Aneesh  
Kumar K. V.: {notmuch} {PATCH 1/2} notmuch-]]


** Link to a specific message
[[notmuch:id:87pr9724pv@fastmail.fm][email from Matt Lundin:  
{Orgmode} Re: HTML export: How]]


* Manually created links
** Link to a tag search
  [[notmuch:tag:notmuch][Search notmuch about notmuch]]
** Link to an aritrary search
  [[notmuch:Thisbe%20dog][Search for Thisby dog]]

If you want to try it out, you need a recent org-mode, the file org- 
notmuch.el


  
http://pivot.cs.unb.ca/git/?p=org-mode.git;a=blob_plain;f=lisp/org-notmuch.el;hb=notmuch-link

And a patched notmuch.el from

   
http://pivot.cs.unb.ca/git/?p=notmuch.git;a=blob_plain;f=notmuch.el;hb=org-link

Of course you can just clone those two git repos if you want.

The org-mode side is still subject to change as Carl
merges/modifies/rejects my proposed patches to notmuch.

David


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


- Carsten





___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Bug in org-beamer-settings-template

2009-12-08 Thread Carsten Dominik

Indeed, thank you very much, fixed now.

- Carsten


On Dec 8, 2009, at 6:46 AM, Ethan Ligon wrote:

Org-mode has been my constant companion for nearly two years now,  
but I keep
discovering new and wonderful things it can do.  It's been my  
practice for
somewhile to outline my talks in org-mode, export that to LaTeX, and  
then to
transform that into a beamer presentation by hand.  Faced with this  
tedious task
this weekend, I wondered whether it wouldn't be easy to automate  
parts of this
by customizing org-latex.  A couple of googles later and I found  
myself in this

thread, and a git clone after that I've got some nice slides.

This is just great!  But I've found a very minor bug to report.   
After invoking

org-beamer-settings-template and [g]lobal, I get the template:

#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation]
#+BEAMER_FRAME_LEVEL: 1

#+BEAMER_HEADER_EXTRA: \usetheme{default}\usecolortheme{default}
#+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args)
%4BEAMER_col(Col) %8BEAMER_extra(Extra)
PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 :ETC

Note the final line.  Surely this should be preceded by a #+?

-Ethan



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


- Carsten





___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Beamer support - 2nd round

2009-12-08 Thread Carsten Dominik


On Dec 7, 2009, at 9:15 PM, JBash wrote:


This is not working quite right for me...
I pulled the latest beamer branch from git this morning and  
installed it.  I am getting the export to latex, but no columns in  
the beamer (tex) and resulting pdf file.  There is a title frame, a  
TOC (blank) frame, and then a single frame titled This is the first  
structural section.  All other elements are nested itemized lists  
on that single slide.


I manually copied the org-beamer.el file to my site-lisp area.  Is  
that supposed to be installed along with the other org files?


I had also previously defined org-latex-export-classes, and have  
removed that from my .emacs file.


I am also seeing an unexpected error the *second* (and subsequent)  
time I export (without changes to the org file) to to PDFabout a  
column-width function:


Select command:
Exporting to PDF...
Exporting to LaTeX...
org-beamer-open-column: Symbol's function definition is void: org- 
beamer-add-units-to-column-width


Ah, I changed the name of this function, but not in all places, sorry  
about that.


Fixed now.

- Carsten



If I restart emacs, I can export again (1 time) without these errors.

If this points to something obvious in my configuration, please let  
me know.  I suspect I have something strangely configured, as no one  
else is having these issues.


Thanks,
Jerry


- Carsten





___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Beamer support - 2nd round

2009-12-08 Thread Carsten Dominik

Hi Magnus,

that does work for me

- Carsten

On Dec 6, 2009, at 2:13 PM, Magnus Henoch wrote:

Bug report: LATEX_HEADER doesn't work in the beamer branch, neither  
for normal
LaTeX exports nor for beamer export.  It works fine in the master  
branch.


Here is my test case.  The commands in the header are necessary for  
the Esperanto
characters to show up in the PDF output.  Of course, you can also  
check the

outcome by reading the produced LaTeX file.

#+LATEX_HEADER: \DeclareUnicodeCharacter{0108}{\^C}
\DeclareUnicodeCharacter{011D}{\^g}
* Ĉu ĝi funkcias?
Jes, ĝi bone funkcias.


Regards,
Magnus



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


- Carsten





___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [Babel] - importing a data file- missing header row

2009-12-08 Thread Thomas S. Dye

Hi Graham,

On Dec 8, 2009, at 6:41 AM, Graham Smith wrote:


I need a bit of help importing a data file into orgmode/babel.

The import doesn't seem to know about having a header row

#+srcname:woodland
#+begin_src R
read.table(/home/graham/Dropbox/College/BY4001/WoodlandData/ 
BY4001WoodlandDataFinal.txt,header=TRUE)

#+end_src

#+resname: woodland
| V1.1  | v | 0 | 0 | 0 |  0 | 0 |  0 |  0 |  0 |  0 |  0 |  0 |
0 |  0 |  0 | 0 |  0 | 0 |  0 |  0 |  0 |  0 | 0 |  0 | 0 | 0 |  0 |
0 |  0 | 0 |  0 |  5 |  0 |  0 | 10 |  0 | 0 |  0 | 100 |  0 |  3 | B


But strangely if I change the command and run the names(woodland)
after the import, I get a table of variable names but no data. I'm not
sure if the data is there but hidden as I can't get any commands to
work on the woodland object.

* Woodland Data
#+srcname:woodland
#+begin_src R
woodland-read.table(/home/graham/Dropbox/College/BY4001/ 
WoodlandData/BY4001WoodlandDataFinal.txt,header=TRUE)

names(woodland)
#+end_src

#+resname: woodland
| ID   |
| wood |
| Ajug.Rept|
| Ange.sylv|
| Brac.sylv|
| Brom.ramo|
| Care.pend|
| Care.remo|
| Care.sylv|
| Cirs.palu|
| Cory.avel|
| Desc.caes|
| Dryo.fili|
| Endy.non |
| Euph.amyg|

So it seems I already need some more help.

Graham


One solution would be to use a :session.  Variables created in R will  
persist in the session and can be shared by source code blocks  
assigned to the :session.


I don't have access to your data, but the following source code blocks  
should work for you.  I've chosen to name the session 'woodland' but  
you can name it whatever you'd like, or not name it and use the  
default session.


* Woodland Data
	- Create a variable woodland and populate it with  
BY4001WoodlandDataFinal.txt


#+srcname:woodland
#+begin_src R :session woodland
woodland-read.table(/home/graham/Dropbox/College/BY4001/WoodlandData/ 
BY4001WoodlandDataFinal.txt,header=TRUE)

#+end_src

- Run some summary commands to see if the woodland variable looks right
#+begin_src R :session woodland
names(woodland)
str(woodland)
summary(woodland)
#+end_src

- Show the woodland data
#+begin_src R :session woodland
woodland
#+end_src

I like this approach because I don't have to save a bunch of R objects  
when I'm done.  I just re-create them when I need them again, because  
the R code that I've already tested is saved with my org file.


HTH,
Tom___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [babel] [Orgmode] Babel - importing a data file- missing header row

2009-12-08 Thread Dan Davison
Graham Smith myotis...@gmail.com writes:

 I need a bit of help importing a data file into orgmode/babel.

 The import doesn't seem to know about having a header row


Hi Graham,

Could you post the first few lines of your data file, or a small example
with the same format, as I don't completely understand the output you
are getting.

But try using the ':colnames t' header argument. For example, if I have
this data file (space-separated, header line has same num entries as
data rows).

-
ID wood A.reptans E.amygdaloides   
a wood1 5 10
b wood2 1 0
-

Then I get

#+srcname:woodland
#+begin_src R
read.table(/tmp/woodlands.txt,header=TRUE)
#+end_src

#+results: woodland
| a | wood1 | 5 | 10 |
| b | wood2 | 1 |  0 |

And if I use the colnames header argument I get

#+srcname:woodland
#+begin_src R :colnames t
read.table(/tmp/woodlands.txt,header=TRUE)
#+end_src

#+results: woodland
| ID | wood  | A.reptans | E.amygdaloides |
|--+-+-+--|
| a  | wood1 |   5 |   10 |
| b  | wood2 |   1 |0 |

Also, I recommend working with the :session header argument. Then after
you evaluate an org-babel block, you can go to the ESS session and
examine the R objects it has created. You'd need to save the data frame
to a variable of course, so something like this

#+srcname:woodland
#+begin_src R :colnames t :session
  woodlands - read.table(/tmp/woodlands.txt,header=TRUE)
  woodlands
#+end_src

Now if I switch to the *R* buffer, I can see what it has done:


First you'll see some lines like this; these reflect what org-babel did

---
 
woodlands - read.table(/tmp/woodlands.txt,header=TRUE)
write.table(.Last.value, file=/tmp/org-babel-R6645iE0, sep=\t, 
na=nil,row.names=FALSE, col.names=TRUE, quote=FALSE)
'org_babel_R_eoe'

 woodlands - read.table(/tmp/woodlands.txt,header=TRUE)
 write.table(.Last.value, file=/tmp/org-babel-R6645iE0, sep=\t, 
 na=nil,row.names=FALSE, col.names=TRUE, quote=FALSE)
 'org_babel_R_eoe' 
[1] org_babel_R_eoe
---\
Ignore the org_babel_R_eoe stuff, that's to do with org-babel internals.

Now you can check that your variable looks sensible:

---\
 woodlands
  ID  wood A.reptans E.amygdaloides
1  a wood1 5 10
2  b wood2 1  0
 
---\

Dan

p.s. Please include the string [babel] in the subject line!

 #+srcname:woodland
 #+begin_src R
 read.table(/home/graham/Dropbox/College/BY4001/WoodlandData/BY4001WoodlandDataFinal.txt,header=TRUE)
 #+end_src

 #+resname: woodland
 | V1.1  | v | 0 | 0 | 0 |  0 | 0 |  0 |  0 |  0 |  0 |  0 |  0 |
 0 |  0 |  0 | 0 |  0 | 0 |  0 |  0 |  0 |  0 | 0 |  0 | 0 | 0 |  0 |
 0 |  0 | 0 |  0 |  5 |  0 |  0 | 10 |  0 | 0 |  0 | 100 |  0 |  3 | B


 But strangely if I change the command and run the names(woodland)
 after the import, I get a table of variable names but no data. I'm not
 sure if the data is there but hidden as I can't get any commands to
 work on the woodland object.

 * Woodland Data
 #+srcname:woodland
 #+begin_src R
 woodland-read.table(/home/graham/Dropbox/College/BY4001/WoodlandData/BY4001WoodlandDataFinal.txt,header=TRUE)
 names(woodland)
 #+end_src

 #+resname: woodland
 | ID   |
 | wood |
 | Ajug.Rept|
 | Ange.sylv|
 | Brac.sylv|
 | Brom.ramo|
 | Care.pend|
 | Care.remo|
 | Care.sylv|
 | Cirs.palu|
 | Cory.avel|
 | Desc.caes|
 | Dryo.fili|
 | Endy.non |
 | Euph.amyg|

 So it seems I already need some more help.

 Graham


 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Big curly bracket

2009-12-08 Thread Nick Dokos
[This is OT for this list - comp.text.tex is a better venue.  Otoh, the
 reference might be useful to some people here - but unless org-mode
 content can be added, let's make this the end of the thread. Thanks.]

I don't know anything about the gathered environment, but the standard
solutions are the ones that Olivier Schwander suggested. In your case, the
array solution looks like this:

,
| \documentclass{article}
| 
| \usepackage{amsmath}
| 
| \begin{document}
| \[
| \phi_{sum}(g1))(\bot) = (\phi_{sum}(g2))(\bot) = \left\{
|   \begin{array}{rl}
| 1  \text{if } x  0 \\
| \bot  \text{otherwise}
|   \end{array}
| \right.
| \]
| \end{document}
`

This can be found in the published books, but also in the online
(Not so) Short Introduction to LaTeX by Tobias Oetiker et al., p.58.
The URL is

   http://www.tex.ac.uk/tex-archive/info/lshort/english/lshort.pdf

Nick


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Beamer support - 2nd round

2009-12-08 Thread JBash
On Tue, Dec 8, 2009 at 12:21 PM, Carsten Dominik
carsten.domi...@gmail.comwrote:


 On Dec 7, 2009, at 9:15 PM, JBash wrote:


 This is not working quite right for me...
 I pulled the latest beamer branch from git this morning and installed it.
  I am getting the export to latex, but no columns in the beamer (tex) and
 resulting pdf file.  There is a title frame, a TOC (blank) frame, and then a
 single frame titled This is the first structural section.  All other
 elements are nested itemized lists on that single slide.

 I manually copied the org-beamer.el file to my site-lisp area.  Is that
 supposed to be installed along with the other org files?

 I had also previously defined org-latex-export-classes, and have removed
 that from my .emacs file.

 I am also seeing an unexpected error the *second* (and subsequent) time I
 export (without changes to the org file) to to PDFabout a column-width
 function:

 Select command:
 Exporting to PDF...
 Exporting to LaTeX...
 org-beamer-open-column: Symbol's function definition is void:
 org-beamer-add-units-to-column-width


 Ah, I changed the name of this function, but not in all places, sorry about
 that.

 Fixed now.

 - Carsten



 If I restart emacs, I can export again (1 time) without these errors.

 If this points to something obvious in my configuration, please let me
 know.  I suspect I have something strangely configured, as no one else is
 having these issues.

 Thanks,
 Jerry


 - Carsten

Great.  I pulled the latest and the problem is solved.  Thanks very much,
Carsten.

I don't know if you're looking for this level in anomalies at this point in
the process of beamer support... if so, I am still getting an unexpected
behavior on the first export to latex / build pdf.  When I first open emacs
and load the test file, the resulting pdf file does not have columns or the
specified theme (appears to be the default theme instead).  Subsequent
exports/builds work fine.

Thanks again.
Jerry
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [babel] [Orgmode] Babel - importing a data file- missing header row

2009-12-08 Thread Graham Smith
Dan,

Using session gets everything working as I expect it to, at least so
far it does. I will work through the other aspects you suggest but for
now its looking good.

 Could you post the first few lines of your data file, or a small example
 with the same format, as I don't completely understand the output you
 are getting.

The difficulty in understanding the output I posted was probably
because while it looked OK when I posted it, the version that appeared
wrapped twice. But its working now.

 p.s. Please include the string [babel] in the subject line!

Ah yes, I misunderstood your first request and just thought you meant
to make sure babel was in the subject line,which I did,  but you mean
[babel] not just babel.

Many thanks again,

Graham


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [babel] R questions

2009-12-08 Thread Sébastien Vauban
Hi Thomas,

Thomas S. Dye wrote:
 On Dec 7, 2009, at 11:50 PM, Sébastien Vauban wrote:

 [2] I guess one could potentially think about dealing with missing values
 more explicitly in org-babel. E.g. there could be a header arg
 specifying what values are to be treatyed as missing. Nothing like
 that exists currently.

 I guess such a feature would be required on the long term. Of course, even
 specifying what would be the needed behavior is already difficult, I think.
 One must have good knowledge of the multiple languages and environments,
 and try to abstract the best behavior out of these.

 Side note -- I know, for example, that there is an option in Access to let
 it consider the empty string ('') as the NULL value, or not. Clear.

 But what's a NA value in general?  Is 0 always a meaningful value as
 numeric?  Context-sensitive..

 NA is a logical constant of length 1 which contains a missing value
 indicator. Whether or not 0 is a meaningful value as numeric depends on your
 data and the questions you are asking of it. You don't ask this question,

?  I thought I addressed that when asking (to myself) Is 0 always a
meaningful value as numeric? and answering [that it certainly is]
context-sensitive..


 but if I read this thread correctly and you are trying to workaround a data
 input problem with R in Org-babel,

No, you misread, or I mis-wrote ;-)

I wasn't speaking of R only, saying that such a feature would be required on
the long term [... for] the multiple languages.

Thinking at shell-script (with empty strings), SQL code (with empty strings
and NULL values), etc.


 then replacing missing values with 0 in a numeric context to get around the
 Org-babel problem is NOT a good idea.

Implementing a fixed interpretation is NOT a good idea. I share your point of
view.

My comments were:

- I think we must be able to write a rule for interpreting empty (whatever
  it means) values;

- We should think at what's needed to cover the current and future needs, not
  focusing on one specific language (R), but thinking at all of them (shell
  commands, SQL, etc.).

Best regards,
  Seb

-- 
Sébastien Vauban



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [babel] R questions

2009-12-08 Thread Thomas S. Dye

Hi Sebastien,

On Dec 8, 2009, at 11:37 AM, Sébastien Vauban wrote:


Hi Thomas,

Thomas S. Dye wrote:

On Dec 7, 2009, at 11:50 PM, Sébastien Vauban wrote:

[2] I guess one could potentially think about dealing with  
missing values

   more explicitly in org-babel. E.g. there could be a header arg
   specifying what values are to be treatyed as missing. Nothing  
like

   that exists currently.


I guess such a feature would be required on the long term. Of  
course, even
specifying what would be the needed behavior is already difficult,  
I think.
One must have good knowledge of the multiple languages and  
environments,

and try to abstract the best behavior out of these.

Side note -- I know, for example, that there is an option in  
Access to let

it consider the empty string ('') as the NULL value, or not. Clear.

But what's a NA value in general?  Is 0 always a meaningful  
value as

numeric?  Context-sensitive..


NA is a logical constant of length 1 which contains a missing value
indicator. Whether or not 0 is a meaningful value as numeric  
depends on your
data and the questions you are asking of it. You don't ask this  
question,


?  I thought I addressed that when asking (to myself) Is 0 always a
meaningful value as numeric? and answering [that it certainly is]
context-sensitive..


but if I read this thread correctly and you are trying to  
workaround a data

input problem with R in Org-babel,


No, you misread, or I mis-wrote ;-)

I wasn't speaking of R only, saying that such a feature would be  
required on

the long term [... for] the multiple languages.

Thinking at shell-script (with empty strings), SQL code (with empty  
strings

and NULL values), etc.


then replacing missing values with 0 in a numeric context to get  
around the

Org-babel problem is NOT a good idea.


Implementing a fixed interpretation is NOT a good idea. I share your  
point of

view.

My comments were:

- I think we must be able to write a rule for interpreting  
empty (whatever

 it means) values;

- We should think at what's needed to cover the current and future  
needs, not
 focusing on one specific language (R), but thinking at all of them  
(shell

 commands, SQL, etc.).

Best regards,
 Seb

--
Sébastien Vauban


I agree with you on the importance of having some way to represent  
missing values in Org-babel that can be translated cleanly and  
transparently to the representations used by specific languages.


I was responding to one part of your longer message in the context of  
the message subject, R questions.  I see now that you were asking a  
more general question.  Mea culpa.


All the best,
Tom

Thomas S. Dye, Ph.D.
T. S. Dye  Colleagues, Archaeologists, Inc.
Phone: (808) 529-0866 Fax: (808) 529-0884
http://www.tsdye.com

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [babel] R - variable names in summary

2009-12-08 Thread Graham Smith
Dan

I have started a new thread so it has a propel babel string. I have
also created a small file for testing.

The colnames t works as expected, but how do I then see the variable
names when using the summary command, and str doesn't work at all
(source block produced no output) . They appear OK in the R buffer.

Orgmode+babel output below

Graham

#+srcname:babeltest
#+begin_src R :colnames t
babeltest-read.csv(/home/graham/Dropbox/myotis/Learn/learn/babeltest.csv,header=TRUE)
#+end_src

#+resname: babeltest
| ID | var1 | var2 | var3 |
|--+++|
|1 | 34 |  1 |400 |
|2 | 56 |  4 |499 |
|3 | 78 |  3 |500 |
|4 | 34 |  5 |600 |
|5 | 56 |  6 |500 |
|6 | 23 |  7 |300 |
|7 | 45 |  5 |200 |
|8 | 23 |  6 |340 |
|9 | 89 |  7 |400 |
|   10 | 46 |  4 |450 |



#+begin_src R :session babeltest
summary(babeltest)
#+end_src

#+resname:
| Min.   : 1.00 | Min.   :23.0 | Min.   :1.0 | Min.   :200.0 |
| 1st Qu.: 3.25 | 1st Qu.:34.0 | 1st Qu.:4.0 | 1st Qu.:355.0 |
| Median : 5.50 | Median :45.5 | Median :5.0 | Median :425.0 |
| Mean   : 5.50 | Mean   :48.4 | Mean   :4.8 | Mean   :418.9 |
| 3rd Qu.: 7.75 | 3rd Qu.:56.0 | 3rd Qu.:6.0 | 3rd Qu.:499.8 |
| Max.   :10.00 | Max.   :89.0 | Max.   :7.0 | Max.   :600.0 |

#+begin_src R :session babeltest
str(babeltest)
#+end_src

#+resname:
ID,var1,var2,var3
1,34,1,400
2,56,4,499
3,78,3,500
4,34,5,600
5,56,6,500
6,23,7,300
7,45,5,200
8,23,6,340
9,89,7,400
10,46,4,450
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [babel] R - variable names in summary

2009-12-08 Thread Austin Frank
On Tue, Dec 08 2009, Graham Smith wrote:

 The colnames t works as expected, but how do I then see the variable
 names when using the summary command, and str doesn't work at all
 (source block produced no output) . They appear OK in the R buffer.

This is help from the R side, not from the org-babel side.  If these
suggestions don't work, one of the babelers will have to step in.

Many functions that print output to the interactive buffer will not
produce that output when called outside of the interactive buffer.  For
these functions, if you wrap them in print() you can usually get the
results you want.  So, in your R code blocks, try

  print(summary(whatever))

and

  print(str(whatever))

If all you need is the names of the columns,

  print(names(whatever))

might be useful.

HTH,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpUu6btqC7eX.pgp
Description: PGP signature
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode