all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Adding `sort' in R makes the output fail
@ 2014-10-23 14:37 Sebastien Vauban
       [not found] ` <alpine.OSX.2.00.1410230848520.460@charles-berrys-macbook.local>
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastien Vauban @ 2014-10-23 14:37 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

The following code does return a corrupted answer, while it's supposed
to return a sorted dataframe.

--8<---------------cut here---------------start------------->8---
#+BEGIN_SRC R :results value replace
con <- textConnection("
index	email
A	abc-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org
B	def-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org
C	def-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org
D	ghi-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org
E	abc-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org
F	def-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org")
df <- read.table(con, header = TRUE)
sort(table(df$email))
#+END_SRC

#+results:
| 1 |
| 2 |
| 3 |
--8<---------------cut here---------------end--------------->8---

See video at http://screencast.com/t/4u4Sj1Mkycwp to see the effect of
adding `sort', and see the output in RStudio (correct in both cases:
with and without `sort') on the right side of the video.

What's wrong here?

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-23 20:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-23 14:37 Adding `sort' in R makes the output fail Sebastien Vauban
     [not found] ` <alpine.OSX.2.00.1410230848520.460@charles-berrys-macbook.local>
     [not found]   ` <alpine.OSX.2.00.1410230848520.460-iDQ3frm8jJiryYnjg5slPZa4wMfmKMrbhPhL2mjWHbk@public.gmane.org>
2014-10-23 18:49     ` Sebastien Vauban
2014-10-23 20:04       ` Charles C. Berry

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.