Nick Dokos <ndokos <at> gmail.com> writes: > > tsd <at> tsdye.com (Thomas S. Dye) writes: > > > Aloha Jenia, > > > > jenia.ivlev <at> gmail.com (jenia.ivlev) writes: > > > >> Hello. > >> > >> I'm trying to go through the org-mode tutorial on its official page. > >>
[discussion showing that (if (listp value)...) generates a data.frame deleted] [delete patch turning a data.frame into a vector] > And assuming this is correct, the worg page will need to be corrected > too. > No patch is needed. The point of the code in org-babel-R-assign-elisp is to create a data.frame when `value' is a list. The patch adding `unlist(res)' turns it into an ordinary vector. This will break almost all uses of :var in R scr blocks. I don't think this example could have worked for a long while - turning elisp lists into R data.frames has been a feature for a good while. Also, note the use of `sbe' vs `org-sbe' in the formula. #+TBLFM: @2$1='(sbe "R-mean" (x "tbl-example-data()")) Use `colMeans(x)' to fix the worg page. HTH, Chuck