Description Usage Arguments Details Value Note Author(s) See Also Examples
View source: R/createdefaultmapping.r
This function transforms the mapping and the data base to get a canonical mapping where the aesthetic variables are equal to the names of the data base.
1 | createdefaultmappinganddata(mapping, data, mandatoryarguments=c("x","y"))
|
mapping |
Set of aesthetics. |
data |
Default data frame. It is expected that all layers are included in the data set. |
mandatoryarguments |
Arguments that must appear in the mapping |
It creates an aesthetic layer with the default names. If it is necessary, it changes the names of the data base.
A list with a mapping of aesthetics and a data frame.
Internal use.
Emilio Torres Manzanera
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data <- data.frame(x1=1,y1=2)
mapping <- aes(x = x1 + y1, y = y1) # default names: x and y
mapping
## List of 2
## $ x: language x1 + y1
## $ y: symbol y1
createdefaultmappinganddata(mapping,data)
## $mapping
## List of 2
## $ x: symbol x
## $ y: symbol y
## $data
## x y x1 y1
## 1 3 2 1 2
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.