Description Usage Arguments Examples
Removes specified layers from a ggplot object and gives the option to replace them with a new layer. This layer can be either a geom object created from regular ggplot functions or an output from the ggedit gadget. In the latter case the layers are found in the updatedLayers object in the ggedit output.
1 |
p |
ggplot2 plot object |
oldGeom |
character string of the name of the layer to remove |
oldGeomIdx |
numeric of which index of OldGeom to remove (default is 1) |
newLayer |
ggplot layer or list of layers |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Loading required package: ggplot2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.