Re: [R] randomly sample within clustered data?

2008-09-15 Thread Brown, Tony Nicholas
Thierry, Thanks so much. Your solution works perfectly. Tony -Original Message- From: ONKELINX, Thierry [mailto:[EMAIL PROTECTED] Sent: Monday, September 15, 2008 2:56 AM To: Brown, Tony Nicholas; r-help@r-project.org Subject: RE: [R] randomly sample within clustered data? Something

[R] randomly sample within clustered data?

2008-09-15 Thread Brown, Tony Nicholas
Dear useRs, What is an efficient way to randomly sample from clustered data such that I get equal representation from each cluster? For example, let's say I want to randomly sample two cases from each cluster created by the id variable in the following data frame: id-c(rep(100,

[R] graphically representing frequency of words in a speech?

2009-06-07 Thread Brown, Tony Nicholas
Dear all, I recently saw a graph on television that displayed selected words/phrases in a speech scaled in size according to their frequency. So words/phrases that were often used appeared large and words that were rarely used appeared small. The closest thing I can find on the web to

Re: [R] graphically representing frequency of words in a speech?

2009-06-07 Thread Brown, Tony Nicholas
Thank you so much Mark and Gregor. The basic information, suggestions, and R code that you provided is most helpful. Tony -Original Message- From: Gorjanc Gregor [mailto:gregor.gorj...@bfro.uni-lj.si] Sent: Sunday, June 07, 2009 2:17 PM To: Marc Schwartz; Brown, Tony Nicholas Cc: rhelp

Re: [R] graphically representing frequency of words in a speech?

2009-06-10 Thread Brown, Tony Nicholas
Yihui, This is quite impressive, thanks for helping me think about how to make tag clouds in R. Tony -Original Message- From: Yihui Xie [mailto:xieyi...@gmail.com] Sent: Wednesday, June 10, 2009 3:15 AM To: Brown, Tony Nicholas Cc: r-help@r-project.org Subject: Re: [R] graphically

[R] confidence intervals for differences in proportions from complex survey design?

2015-05-10 Thread Brown, Tony Nicholas
All: I need to generate confidence intervals for differences in proportions using data from a complex survey design. An example follows where I attempt to estimate the difference in depression prevalence by sex. # Data might look something like this: Dfr-data.frame(depression=sample(c(yes,no),