Hi, I have a dataset with many variables and observations. The variable Group has two levels: C and P, the Month variable has four levels: 0, 1, 2 and 3. I want to extract a subset of the variable Weight, considering only 1 and 3 levels for Months of the Group variable. I tried the command subset but it did not work. Any suggestions? Thanks, -------------------------------------- Silvano Cesar da Costa Departamento de Estat?stica Universidade Estadual de Londrina Fone: 3371-4346
On 10.05.2010 14:35, Silvano wrote:> Hi, > > I have a dataset with many variables and observations. > The variable Group has two levels: C and P, > the Month variable has four levels: 0, 1, 2 and 3. > > I want to extract a subset of the variable Weight, considering only 1 > and 3 levels for Months of the Group variable. > > I tried the command subset but it did not work. Any suggestions?Tell us how you used it and how your data looks like and we may be in a position to help afterwards,. > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. Uwe Ligges> Thanks, > > -------------------------------------- > Silvano Cesar da Costa > Departamento de Estat?stica > Universidade Estadual de Londrina > Fone: 3371-4346 > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Hi, My first suggestion would be to supply a sample data (maybe using the function dput) showing what you have, what you want to do, and what you've tried (you say that subset() didn't work but we don't know how you've typed it). Then, we'll see! Ivan Le 5/10/2010 14:35, Silvano a ?crit :> Hi, > > I have a dataset with many variables and observations. > The variable Group has two levels: C and P, > the Month variable has four levels: 0, 1, 2 and 3. > > I want to extract a subset of the variable Weight, considering only 1 > and 3 levels for Months of the Group variable. > > I tried the command subset but it did not work. Any suggestions? > > Thanks, > > -------------------------------------- > Silvano Cesar da Costa > Departamento de Estat?stica > Universidade Estadual de Londrina > Fone: 3371-4346 > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Ivan CALANDRA PhD Student University of Hamburg Biozentrum Grindel und Zoologisches Museum Abt. S?ugetiere Martin-Luther-King-Platz 3 D-20146 Hamburg, GERMANY +49(0)40 42838 6231 ivan.calandra at uni-hamburg.de ********** http://www.for771.uni-bonn.de http://webapp5.rrz.uni-hamburg.de/mammals/eng/mitarbeiter.php