search for: sizeclass

Displaying 5 results from an estimated 5 matches for "sizeclass".

Did you mean: size_class
2012 Aug 07
5
summing and combining rows
...hat needs to be combined so that rows are summed by a group based on a certain variable. I'm pretty sure rowsum() or rowsums() can do this but it's difficult for me to figure out how it will work for my data based on the examples I've read. My data are structured like this: Plot SizeClass Stems 12 Class3 1 12 Class4 3 17 Class3 5 17 Class4 2 I simply want to sum the size classes by plot and create a new data frame with a size class called "Class34" or with the SizeClass variable removed. I actually d...
2011 Feb 25
4
means, SD's and tapply
I'm trying to use tapply to output means and SD or SE for my data but seem to be limited by how many times I can subset it. Here's a snippet of my data > stems353[1:10,] Time DataSource Plot Elevation Aspect Slope Type Species SizeClass Stems 1 Modern Cameron 70F221 1730 ESE 20 Conifer ABCO Class1 3 2 Modern Cameron 70F221 1730 ESE 20 Conifer ABMA Class1 0 3 Modern Cameron 70F221 1730 ESE 20 Hardwood ACMA Class1 0 4 Modern Cameron 70F221 1730...
2011 Feb 08
1
Grouping by factors in R
...by certain factors in R. I have data with the following headings: [1] "Time" "Plot" "LatCat" "Elevation" "ElevCat" "Aspect" "AspCat" "Slope" [9] "SlopeCat" "Species" "SizeClass" "Stems" and I'm trying to use a GLM to test differences in "Stems" for different categories/factors - most importantly, I want to group things so that I see results by "SizeClass" and then by "Species". This is pretty easy in SAS using the &quo...
2012 Apr 05
2
count() function
...ething analogous to the =count function in Excel, but I can't find anything. I simply want to count the data for a given category. I've been using the ddply() function in the plyr package to summarize means and st dev of my data, with this code: ddply(NZ_Conifers,.(ElevCat, DataSource, SizeClass), summarise, avgDensity=mean(Density), sdDensity=sd(Density), n=sum(Density)) and that gives me results that look like this: ElevCat DataSource SizeClass avgDensity sdDensity n 1 Elev1 FIA Class1 38.67768 46.6673478 734.87598 2 Elev1 FIA Class2...
2012 Mar 25
2
avoiding for loops
I have data that looks like this: > df1 group id 1 red A 2 red B 3 red C 4 blue D 5 blue E 6 blue F I want a list of the groups containing vectors with the ids. I am avoiding subset(), as it is only recommended for interactive use. Here's what I have so far: df1 <- data.frame(group=c("red", "red", "red", "blue",