Description Usage Arguments Author(s) See Also Examples
This function uses rasterImage
to
indicate which points in the surface are not significantly different from
zero. Note that the shape of these non-significant regions depends on the
number of data points (often specified with n.grid
).
1 |
data |
Data frame with plot data. A data frame needs to have a
column with x values, a column with y values (specified in |
view |
A vector of length 2 with the names or numbers of the columns to plot on the x axis and y axis respectively. |
predictor |
The name of the column in the data frame
|
valCI |
The name of the column in the data frame
|
col |
Color for the nonsignificant areas. |
alpha |
Level of transparency, number between 0 (transparent) and 1 (no transparency) |
... |
Optional parameters for |
Jacolien van Rij
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # From the package graphics, see help(image):
x <- 10*(1:nrow(volcano))
y <- 10*(1:ncol(volcano))
tmp <- data.frame(value = (as.vector(volcano) - 120),
x = 10*rep(1:nrow(volcano), ncol(volcano)),
y = 10*rep(1:ncol(volcano), each=nrow(volcano)),
CI = rep(20, nrow(volcano)*ncol(volcano)))
plotsurface(tmp, view=c('x', 'y'), predictor='value', main='Maunga Whau Volcano')
plot_signifArea(tmp, view=c('x', 'y'), predictor='value', valCI='CI')
# change color:
plotsurface(tmp, view=c('x', 'y'), predictor='value', main='Maunga Whau Volcano')
plot_signifArea(tmp, view=c('x', 'y'), predictor='value', valCI='CI',
col='red')
# or completely remove 'nonsignificant' area:
plot_signifArea(tmp, view=c('x', 'y'), predictor='value', valCI='CI',
col='white', alpha=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.