Description Usage Arguments Author(s) Examples

Produces a kernel density plot of up to five vectors (this can be biggerized)

1 2 3 |

`a` |
Input vector |

`b` |
Input vector |

`c` |
Input vector |

`d` |
Input vector |

`e` |
Input vector |

`xlab` |
Just like usual |

`ylab` |
Just like usual |

`main` |
Just like usual |

`lty` |
Line type. Accepts one value or a vector of values for each line. Specifying zero will automatically generate one line type for each line. |

`lwd` |
Line width. Accepts one value or a vector of values for each line. Specifying zero will automatically generate one line width for each line. |

`col` |
Line color. Accepts one value or a vector of values for each line. Specifying zero will automatically generate one line color for each line. |

`labels` |
A vector of labels for the legend. |

`yinfl` |
Inflation factor for determining plotting window size. Setting |

`showN` |
Whether to include sample sizes in the legend. Defaults to |

`...` |
Additional plotting arguments |

Matt Tyers

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
a <- rnorm(100)
b <- rnorm(100)
c <- rnorm(100,1,1)
d <- rnorm(100,0,2)
densityplot(a,b,c,d,labels=c("apples","bananas","cucumbers","durians"))
densityplot(a,b,c,d,labels=c("apples","bananas","cucumbers","durians"),col=0,lty=1)
cols <- rainbow(4)
densityplot(a,b,c,d,labels=c("apples","bananas","cucumbers","durians"),col=cols,lty=1,yinfl=1)
a <- rnorm(10)
b <- rnorm(20)
c <- rnorm(100,1,1)
d <- rnorm(100,0,2)
densityplot(a,b,c,d,labels=c("apples","bananas","cucumbers","durians"),col=0,lty=1)
densityplot(a,b,c,d,labels=c("apples","bananas","cucumbers","durians"),col=0,lty=1,bwall=.4)
``` |

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.