15
$\begingroup$

I'm loving the fact that Mathematica has finally implemented the Dataset feature, but I'm still struggling a little with it. I have a Dataset that contains a bunch of functions for different diseases that looks like this:initial dataset

Now I would like to use the list of diseases separately as a list. Extracting a single element works fine, for example:

RRTable[[1,"Cause"]]

returns the String "Oral Cavity and Pharynx Cancer"

However, extracting the whole column by using:

RRTable[[All,"Cause"]]

returns another Dataset: output of column selection

And I cannot find a way to transform this into a list that contains just the list. Any idea on how to do that? Sorry if this is simple but I've been browsing the documentation of Dataset for quite some time now...

$\endgroup$
2
  • $\begingroup$ Have you tried Normal[RRTable[[All,"Cause"]]]; where Head[Normal[RRTable[[All,"Cause"]]]] returns List. $\endgroup$
    – Hans
    Oct 23, 2015 at 0:49
  • $\begingroup$ Brilliant! I was completely unaware of the "Normal" function! Thanks! I feel this is going to help me a lot in more than one context! $\endgroup$ Oct 23, 2015 at 0:53

1 Answer 1

16
$\begingroup$

Try

Normal[RRTable[[All,"Cause"]]]

where

Head[Normal[RRTable[[All,"Cause"]]]]

returns List

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.