Re: [R] dataframe, simulating data

2011-01-02 Thread Sarah
Thanks, Petr! With your script my problem is solved. David, thanks for your help and time as well!! I really appreciate it. -- View this message in context: http://r.789695.n4.nabble.com/dataframe-simulating-data-tp3169246p3170764.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] dataframe, simulating data

2010-12-31 Thread Petr Savicky
On Fri, Dec 31, 2010 at 05:05:08AM -0800, Sarah wrote: > > I'm sorry, I don't think I've made myself clear enough. > > Cases have been randomly assigned to one of the two groups, with certain > probabilities (based on other variables). > So, if there are too many people (i.e., more than 34) assig

Re: [R] dataframe, simulating data

2010-12-31 Thread David Winsemius
On Dec 31, 2010, at 8:32 AM, David Winsemius wrote: On Dec 31, 2010, at 8:05 AM, Sarah wrote: I'm sorry, I don't think I've made myself clear enough. Cases have been randomly assigned to one of the two groups, with certain probabilities (based on other variables). So, if there are too m

Re: [R] dataframe, simulating data

2010-12-31 Thread David Winsemius
On Dec 31, 2010, at 8:05 AM, Sarah wrote: I'm sorry, I don't think I've made myself clear enough. Cases have been randomly assigned to one of the two groups, with certain probabilities (based on other variables). So, if there are too many people (i.e., more than 34) assigned to group 0,

Re: [R] dataframe, simulating data

2010-12-31 Thread Sarah
I'm sorry, I don't think I've made myself clear enough. Cases have been randomly assigned to one of the two groups, with certain probabilities (based on other variables). So, if there are too many people (i.e., more than 34) assigned to group 0, I would like to sample 34 cases from group 0, and g

Re: [R] dataframe, simulating data

2010-12-31 Thread Petr Savicky
On Fri, Dec 31, 2010 at 01:51:18AM -0800, Sarah wrote: > > Dear all, > > I'm having trouble with my dataframe, and I hope someone can help me out... > I have data from 40 subjects, displayed in a dataframe. I have randomly > assigned subjects to group 1 or 0 (mar.y==0 or mar.y==1, with probabilit

Re: [R] dataframe, simulating data

2010-12-31 Thread Jim Lemon
On 12/31/2010 08:51 PM, Sarah wrote: Dear all, I'm having trouble with my dataframe, and I hope someone can help me out... I have data from 40 subjects, displayed in a dataframe. I have randomly assigned subjects to group 1 or 0 (mar.y==0 or mar.y==1, with probabilities used). In the end, I wan

[R] dataframe, simulating data

2010-12-31 Thread Sarah
Dear all, I'm having trouble with my dataframe, and I hope someone can help me out... I have data from 40 subjects, displayed in a dataframe. I have randomly assigned subjects to group 1 or 0 (mar.y==0 or mar.y==1, with probabilities used). In the end, I want 34 cases assigned to group 0, with th