search for: totalyl

Displaying 1 result from an estimated 1 matches for "totalyl".

Did you mean: totally
2004 Apr 15
1
tapply() and barplot() help files for 1.8.1
...ants a vector or matrix. In the code below, z is a dataframe, yllperdth is a numeric and fld is the name of a factor, both in the dataframe. Old version (as used with R 1.8.1): ## Calculate the % of YLLs for each group in the cause classification. x <- tapply(z$yllperdth, z[, fld], sum) totalYLLs <- sum(x) x <- x / totalYLLs * 100 x <- sort(x) ## Plot the chart. horiz = TRUE makes it a bar instead of ## column chart. las = 1 prints the labels horizontally. xplot <- barplot(x, horiz = TRUE, xlab = "Percent of YLLs&quot...