Skip to content
Back to formatted view

Raw Message

Message-ID: <MPG.256c6c861972e5c29896a5@news.gmane.org>
Date: 2009-11-17T07:17:48Z
From: Karl Ove Hufthammer
Subject: Weighted descriptives by levels of another variables

On Mon, 16 Nov 2009 10:43:38 -0500 Andrew Miles <rstuff.miles at gmail.com> 
wrote:
> Thanks!  Using the plyr package and the approach you outlined seems to  
> work well for relatively simple functions (like wtd.mean), but so far  
> I haven't had much success in using it with more complex descriptive  
> functions like describe {Hmisc}.

'describe' outputs a list, not just a vector. To get the actual values 
as vectors, you have to extract them, e.g.:

describe(x)$counts
describe(x)$values

-- 
Karl Ove Hufthammer