the variable you want to analyze (first argument to tapply) and the variable you want to analyze by (the factor, second arg to tapply) both must have the same number of rows, that' s how I read this. CS
Corey Sparks Assistant Professor Department of Demography and Organization Studies College of Public Policy 501 West Durango Blvd Monterrey Building 2.270C San Antonio, TX 78207 corey.sparks 'at' utsa.edu 210 458 3166 On Jun 26, 2010, at 11:46 PM, RaoulD [via R] wrote: > Hi Corey, > > Thanks so much for this. However, I get this error for tapply - > "Error in tapply(RT, RT$R, fun=WA): > arguments must have same length". Any idea how to get around this? > > Thanks again, > Raoul > > View message @ > http://r.789695.n4.nabble.com/Calculating-Summaries-for-each-level-of-a-Categorical-variable-tp2269349p2269815.html > To unsubscribe from Re: Calculating Summaries for each level of a > Categorical variable, click here. > ----- Corey Sparks, PhD Assistant Professor Department of Demography and Organization Studies University of Texas at San Antonio 501 West Durango Blvd Monterey Building 2.270C San Antonio, TX 78207 210-458-3166 corey.sparks 'at' utsa.edu https://rowdyspace.utsa.edu/users/ozd504/www/index.htm -- View this message in context: http://r.789695.n4.nabble.com/Calculating-Summaries-for-each-level-of-a-Categorical-variable-tp2269349p2269988.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]] ______________________________________________ R-help@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.