search for: ylls

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

Did you mean: dlls
2004 Apr 15
1
tapply() and barplot() help files for 1.8.1
...n the output of tapply() before using barplot() because tapply() produces a list and barplot() wants 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 <-...