[O] Configuring html footnote (or adding to end of body)
Sorry if this has been answered before, can’t seem to find a way to search for it… Is there a way to configure the default content of the footer produced during html formatted export? There is a javaScript that I would like to be the last bit of my html every time an org file is exported. Can’t seem to figure that one out. Thanks -- Marco Blanchette, Ph.D. Genomic Scientist Stowers Institute for Medical Research 1000 East 50th Street Kansas City MO 64110 www.stowers.org Tel: 816-926-4071 Cell: 816-726-8419 Fax: 816-926-2018
[Orgmode] Re: Problem whit with code evaluation
Hmm... Thanks Dan. Do we have a different version of org-mode? I just pasted your code in emacs and try to execute it with M-x org-babel-execute-buffer RET without success. The emacs-lisp code works but the python and the R crashes with the following errors taken from the *Org-Babel Error* Output buffer Traceback (most recent call last): File "", line 5, in File "", line 3, in main NameError: global name 'x' is not defined Error in main() : object 'x' not found Calls: write.table -> is.data.frame -> inherits -> main Execution halted The first 4 lines comes from the python script while the last 3 come from the R script Here is my .emacs org-mode configs in case you are wondering... ;;Load org-mode and set global keys (require 'org-install) (add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) (add-hook 'org-mode-hook 'turn-on-font-lock) ; not needed when global-font-lock-mode is on (define-key global-map "\C-cl" 'org-store-link) (define-key global-map "\C-ca" 'org-agenda) (setq org-log-done t) (setq org-startup-indented t) ;; active Babel languages (org-babel-do-load-languages 'org-babel-load-languages '( (R . t) (sh .t) (python . t) (emacs-lisp . t) ) ) Thanks again On 8/18/10 9:37 PM, "Dan Davison" wrote: > * The python example > #+source: square(x) > #+begin_src python > return x*x > #+end_src > > #+call: square(x=6) > > #+results: square(x=6) > : 36 > > * The elisp example of the fibonacci series using a table as argument > > #+tblname: fibonacci-inputs > | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | > | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | > > #+srcname: fibonacci-seq(fib-inputs=fibonacci-inputs) > #+begin_src emacs-lisp > (defun fibonacci (n) > (if (or (= n 0) (= n 1)) > n > (+ (fibonacci (- n 1)) (fibonacci (- n 2) > > (mapcar (lambda (row) > (mapcar #'fibonacci row)) fib-inputs) > #+end_src > > #+results: fibonacci-seq > | 1 | 1 | 2 | 3 | 5 | 8 | 13 | 21 | 34 | 55 | > | 1 | 3 | 8 | 21 | 55 | 144 | 377 | 987 | 2584 | 6765 | > > * Then my own trial in R > #+srcname: test(x, y) > #+begin_src R >p <- x*y > #+end_src > > #+call: test(x=4, y=9) > > #+results: test(x=4, y=9) > : 36 > > #+lob: test(x=3, y=8) > > #+results: test(x=3, y=8) > : 24 -- Marco Blanchette, Ph.D. Assistant Investigator Stowers Institute for Medical Research 1000 East 50th St. Kansas City, MO 64110 Tel: 816-926-4071 Cell: 816-726-8419 Fax: 816-926-2018 ___ 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] Problem whit with code evaluation
Sorry again if this is common knowledge, but the road to orgmode power user is seeded with challenges! I am trying to write an R function that would take 3 arguments, hopefully set up in an org table and have a function run every rows, taking every column as arguments to produce a set of report files... But I am going a bit ahead of myself as I am stuck quite early in the development... My problem is quite basic. For some reason, I can¹t seems to be able to execute the following lines in the org buffer using org-babel-execute-buffer or to export an html of the files. The code block just don't execute and return errors. * Examples take from [[http://orgmode.org/worg/org-contrib/babel/intro.php#sec-7]] * The python example #+source: square(x) #+begin_src python x*x #+end_src #+call: square(x=6) * The elisp example of the fibonacci series using a table as argument #+tblname: fibonacci-inputs | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | #+srcname: fibonacci-seq(fib-inputs=fibonacci-inputs) #+begin_src emacs-lisp (defun fibonacci (n) (if (or (= n 0) (= n 1)) n (+ (fibonacci (- n 1)) (fibonacci (- n 2) (mapcar (lambda (row) (mapcar #'fibonacci row)) fib-inputs) #+end_src * Then my own trial in R #+srcname: test(x y) #+begin_src R p <- x*y #+end_src #+call test(x=4 y=9) #+function test(x=3 y=8) Is there something I am missing? My current setup is: GNU Emacs 23.1.50.1 org-mode (v7.01g) R v2.11.1 XServer running Snow Leopard Server 10.6.4 Thanks for the help -- Marco Blanchette, Ph.D. Assistant Investigator Stowers Institute for Medical Research 1000 East 50th St. Kansas City, MO 64110 Tel: 816-926-4071 Cell: 816-726-8419 Fax: 816-926-2018 ___ 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] R code not producing expected results
Dear all, Sorry if this is something totally obvious but I am learning to use org-mode for my everyday work with R. I just installed the latest stable release of org-mode (v7.01g) on top of GNU Emacs 23.1.50.1 (x86_64-apple-darwin10.2.0, NS apple-appkit-1038.25). I also installed the CRAN ascii package v0.7 on top of R v2.11.1. I am currently working on a MacBook pro with Snow Leopard 10.6.4 Early on today, while reading the org-babel intro, I was able to run the following example but somehow, later tonight, it started to break and I spent the last few hours scratching my head to understand what change and why it now suddenly break. Your help will be greatly appreciated as I am discovering that org-mode in collaboration with org-babel have great potential to help us create more readable report of our daily analysis, as long as I can get through these early hurdles. Here is the org buffer that now breaks: * Two examples of R code that worked when I started the tutorial but suddenly started to fail... ** some R code that should generate a nice table #+BEGIN_SRC R library(ascii) options(asciiType="org") d <- as.data.frame(replicate(4,rnorm(100))) ascii(cor(d),include.rownames=T, include.colnames=T,header=T) #+END_SRC ** Some code straight from [[http://orgmode.org/worg/org-contrib/babel/languages/org-babel-doc-R.php][org-babel]] #+BEGIN_SRC R library(ascii) options(asciiType="org") ascii(summary(table(1:4, 1:4))) #+END_SRC With the following error recover from the *Org-Babel Error* buffer Loading required package: proto Error in as.data.frame.default(x[[i]], optional = TRUE) : cannot coerce class 'c("ascii", "proto", "environment")' into a data.frame Calls: write.table ... data.frame -> as.data.frame -> as.data.frame.default Execution halted Thanks for the helps. -- Marco Blanchette, Ph.D. Assistant Investigator Stowers Institute for Medical Research 1000 East 50th St. Kansas City, MO 64110 Tel: 816-926-4071 Cell: 816-726-8419 Fax: 816-926-2018 ___ 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