Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/plotDensity3d.fnc.R

The densities of two continuous variables is first computed using the `density`

function from package `stats`

. The outer product of the two densities is computed, which can be plotted as a contour map or a perspective plot.

1 2 3 4 5 6 | ```
plotDensity3d.fnc(x, y, plot.type = "contour", color = "terrain",
xlab = NULL, ylab = NULL, zlab = NULL, main = NULL, cex = 1,
lit = TRUE, theta = 0, phi = 0, bw = "nrd0", adjust = 1, kernel = c("gaussian",
"epanechnikov", "rectangular", "triangular", "biweight", "cosine",
"optcosine"), weights = NULL, window = kernel, width, give.Rkern = FALSE,
n = 50, from, to, cut = 3, na.rm = FALSE, ...)
``` |

`x, y` |
Numeric vectors. |

`plot.type` |
The type of plot to make. Can be any of |

`color` |
The colour scheme to use for plots. One of “ |

`xlab, ylab, zlab` |
Titles for the axes. N.B. These must be character strings; expressions are not accepted. Numbers will be coerced to character strings. |

`main` |
The main title on top of the plot. |

`cex` |
The size of label and main text. |

`lit` |
Logical, specifying if lighting calculation should take place on geometry. |

`theta` |
Angle defining the viewing direction. |

`phi` |
Angle defining the viewing direction. |

`bw, adjust, kernel, weights, window, width, give.Rkern, n, from, to, cut, na.rm` |
See help page to function |

`...` |
Further arguments passed to functions |

See help page to the `density`

function.

Either a contour map or a perspective plot. Invisibly returns

`x ` |
The numeric vector supplied in argument |

`y ` |
The numeric vector supplied in argument |

`xd ` |
The density object tied to vector |

`yd ` |
The density object tied to vector |

`mat ` |
The outer product of the |

`col ` |
The color used for plotting. |

Antoine Tremblay, Statistics Canada, trea26@gmail.com.

`contour`

;
`persp`

;
`density`

;
`outer`

1 | ```
# see example in LMERConvenienceFunctions help page.
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.