[R] Problems reshaping data with cast()

Neil Shephard nshephard at gmail.com
Thu Feb 7 15:38:17 CET 2008


On Feb 7, 2008 2:21 PM, hadley wickham <h.wickham at gmail.com> wrote:
> Hi Neil,
>
> I think your cast statement is wrong.  You have
>
> cast(norm.all.melted.height, Sample.Name + SNP + Pool ~ value, sum)
>
> but I think you want
>
> cast(norm.all.melted.height, Sample.Name + SNP + Pool ~ ., sum)
>
> i.e. value never appears in the cast formula.

Hi Hadley,

Your right, my formula was wrong. I should have had 'variable' in
place of 'value'.

> cast(norm.all.melted.height, Sample.Name + SNP + Pool ~ variable, sum)

Thanks for the help, and apologies for the dumb mistake (I even have
your paper from Journal of Statistical Software sat on my desk and
still managed to miss the glaringly obvious).

"Everyone is entitled to be stupid, but some abuse the privilege."  - Unknown

I guess I've been abusing my privilege a bit today.

Neil
-- 

Email - nshephard at gmail.com / n.shephard at sheffield.ac.uk
Photos - http://www.flickr.com/photos/slackline/



More information about the R-help mailing list