Description Usage Arguments Value Other Functions Required Author(s) Examples
This function writes the contents of an object to a plot. The object may be either a data frame or a matrix. Values in the input data frame or matrix must be of class numeric, character, or factor.
1 2 | write.object(obj, n.digits = 2, r.names = TRUE, c.names = TRUE,
r.cex = 1, c.cex = 1, miss = "NA")
|
obj |
The object (either a data frame or a matrix). |
n.digits |
Number of digits after the decimal point for numeric values. The default is 2. |
r.names |
Logical value that indicates whether to print the row names, where TRUE = print the row names and FALSE = do not print the row names. The default is TRUE. |
c.names |
Logical value that indicates whether to print the column names, where TRUE = print the column names and FALSE = do not print the column names. The default is TRUE. |
r.cex |
Character expansion parameter for the row labels. The default is 1. |
c.cex |
Character expansion parameter for the column labels. The default is 1. |
miss |
The missing value code expressed as a character string. The default is "NA". |
The function returns NULL. Side effect of the function is to write contents of the input object to a plot.
input.format
format an input value
Tom Kincaid Kincaid.Tom@epa.gov
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | z <- rnorm(100)
z.mean <- c(tapply(z, rep(1:4, rep(25,4)), mean), mean(z))
z.sd <- sqrt(c(tapply(z, rep(1:4, rep(25,4)), var), var(z)))
z.upper <- z.mean+1.96*z.sd
z.lower <- z.mean-1.96*z.sd
obj <- data.frame(rbind(z.mean, z.sd, z.upper, z.lower))
dimnames(obj) <- list(c("Mean Estimate", "Standard Deviation", "Lower 95\%
Conf. Bound", "Upper 95\% Conf. Bound"), c(paste("Stratum", 1:4, sep=""),
"AllStrata"))
write.object(obj, n.digits=3, r.cex=0.75)
obj <- data.frame(matrix(round(5 + runif(30), 1), nrow=6))
colnames(obj) <- c("United States", "Russia", "Germany", "Japan", "France")
write.object(obj, n.digits=1, r.names=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.