That isn't exactly what I'm looking for...what i'm trying to do is transform something like the first one here to the second:
│ Row │ ct │ x │ ├─────┼─────┼───────────┤ │ 1 │ "A" │ -1.17715 │ │ 2 │ "B" │ 0.781145 │ │ 3 │ "C" │ 0.74948 │ │ 4 │ "D" │ -1.88212 │ │ 5 │ "E" │ 1.30658 │ │ Row │ ct │ "A" │"B" | "C" | "D" | "E" ├───┼─────┼───────|──-------┤------------|-------------- │ 1 │ -1.17715 │ 0.781145 | 0.74948|-1.88212 | 1.30658 On Sunday, September 4, 2016 at 2:49:35 PM UTC-5, Reuben wrote: > > Seems like this should be easy, probably is, but I cannot figure out how > to get it to work with the melt / stack functions. The reason I want to is, > I'm finding that with the data I have, I search for a the row where the > string in column 1 == myparameter, then I get the values for columns 2-6, > clumsily extract them into an array (because a dataframe row is not a > dataArray), then apply the mean function to this array. It would be a lot > simpler to have column names that were based on my parameter values. Then i > could say "mean(df[:parameter][2:6])" and be done. > > I suspect I am missing out on how to use dataframes to make this easy; can > someone point me in the right direction? > > -Reuben > -- You received this message because you are subscribed to the Google Groups "julia-stats" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
