├── .DS_Store ├── .Rbuildignore ├── .gitattributes ├── .gitignore ├── DESCRIPTION ├── LabellingBarplot.md ├── NAMESPACE ├── NEWS.md ├── R ├── .DS_Store ├── ggplotAssist.R ├── sysdata.rda └── textFunction.R ├── README.md ├── cran-comments.md ├── data-raw ├── all.csv ├── default.csv ├── geom.csv ├── setting.csv └── theme.csv ├── figure ├── unnamed-chunk-1-1.png ├── unnamed-chunk-10-1.png ├── unnamed-chunk-11-1.png ├── unnamed-chunk-14-1.png ├── unnamed-chunk-15-1.png ├── unnamed-chunk-16-1.png ├── unnamed-chunk-18-1.png ├── unnamed-chunk-2-1.png ├── unnamed-chunk-2-2.png ├── unnamed-chunk-3-1.png ├── unnamed-chunk-4-1.png └── unnamed-chunk-9-1.png ├── ggplotAssist.Rproj ├── inst ├── .DS_Store ├── rstudio │ └── addins.dcf ├── textFunctionExample │ ├── app.R │ └── setting.csv └── textFunctionExample2 │ └── app.R ├── man ├── .DS_Store ├── ggplotAssist.Rd ├── selectizeInput3.Rd ├── splitData.Rd ├── textAreaInput4.Rd ├── textFunction.Rd ├── textFunctionInput.Rd ├── textInput4.Rd └── uiOutput3.Rd ├── textFunctionInput.md └── vignettes ├── .DS_Store └── ggplotAssist.Rmd /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardiomoon/ggplotAssist/1db61ade40f824ef42f027b6f4553ba46a325d05/.DS_Store -------------------------------------------------------------------------------- /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^.*\.Rproj$ 2 | ^\.Rproj\.user$ 3 | ^data-raw$ 4 | cran-comments.md 5 | textFunctionInput.md -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | .Ruserdata 5 | inst/doc 6 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: ggplotAssist 2 | Type: Package 3 | Title: 'RStudio' Addin for Teaching and Learning 'ggplot2' 4 | Version: 0.1.4 5 | Imports: 6 | shiny (>= 0.13), 7 | miniUI (>= 0.1.1), 8 | rstudioapi (>= 0.5), 9 | shinyWidgets, 10 | shinyAce, 11 | stringr, 12 | tidyverse, 13 | ggplot2, 14 | dplyr, 15 | magrittr, 16 | tibble, 17 | scales, 18 | ggthemes, 19 | gcookbook, 20 | moonBook, 21 | editData 22 | Suggests: 23 | knitr, 24 | rmarkdown, 25 | markdown 26 | Authors@R: person("Keon-Woong", "Moon", email = "cardiomoon@gmail.com", 27 | role = c("aut", "cre")) 28 | URL: https://github.com/cardiomoon/ggplotAssist 29 | BugReports: https://github.com/cardiomoon/ggplotAssist/issues 30 | Description: An 'RStudio' addin for teaching and learning making plot using the 'ggplot2' package. 31 | You can learn each steps of making plot by clicking your mouse without coding. 32 | You can get resultant code for the plot. 33 | Depends: R (>= 2.10) 34 | License: GPL-3 35 | Encoding: UTF-8 36 | LazyData: true 37 | RoxygenNote: 6.0.1 38 | VignetteBuilder: knitr 39 | -------------------------------------------------------------------------------- /LabellingBarplot.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Labelling Barplot with ggplotAssist(I)" 3 | author: "Keon-Woong Moon" 4 | date: "2017-11-13" 5 | output: rmarkdown::html_vignette 6 | vignette: > 7 | %\VignetteIndexEntry{Labelling Barplot} 8 | %\VignetteEngine{knitr::rmarkdown} 9 | %\VignetteEncoding{UTF-8} 10 | --- 11 | 12 | 13 | 14 | In this vignette, you will learn how to add labels to bar plots representing counts. Labelling bar plots representing values will be coverd in the next vignette. You can add labels using geom_text() function. If you want to add labels to the proportional bar plots, you have to make some manipulation of your data. 15 | 16 | plot of chunk unnamed-chunk-1 17 | 18 | # Bar plot representing count 19 | 20 | ## Stacked bar plot 21 | 22 | The default `position` of the geom_bar() function is `stack` and the default stat is `count`. You can make bar plot with geom_bar(stat="count"). This is identical with stat_count(geom="bar"). 23 | 24 | 25 | ```r 26 | ggplot(mtcars,aes(x=factor(cyl),fill=factor(gear)))+geom_bar(stat="count") 27 | ``` 28 | 29 | plot of chunk unnamed-chunk-2 30 | 31 | ```r 32 | ggplot(mtcars,aes(x=factor(cyl),fill=factor(gear)))+stat_count(geom="bar") 33 | ``` 34 | 35 | plot of chunk unnamed-chunk-2 36 | 37 | You can add labels to bar plot using geom_text(). You can add labels represneting counts with the following code. The geom_text() needs x,y and label. 38 | 39 | 40 | ```r 41 | ggplot(mtcars,aes(x=factor(cyl),fill=factor(gear)))+ 42 | geom_bar()+ 43 | geom_text(aes(label=..count..),stat="count",position=position_stack()) 44 | ``` 45 | 46 | plot of chunk unnamed-chunk-3 47 | 48 | If you want to put the label in the middle of each bar, set the `vjust` argument of position_stack() function to `0.5`. 49 | 50 | 51 | ```r 52 | ggplot(mtcars,aes(x=factor(cyl),fill=factor(gear)))+ 53 | geom_bar()+ 54 | geom_text(aes(label=..count..),stat="count",position=position_stack(0.5)) 55 | ``` 56 | 57 | plot of chunk unnamed-chunk-4 58 | 59 | ## labelling stacked barplot with ggplotAssist 60 | 61 | ### Mapping the variables 62 | 63 | Launch ggplotAssist add-in. Check the data name(1). After select the `as factor` checkbox(2), select `x` and `factor(cyl)` to map the x-axis variable(not shown). Select `fill`(3) and `factor(gear)`(arrow) to map the fill variable. 64 | 65 | plot of chunk unnamed-chunk-5 66 | 67 | ### Add geom_bar() layer 68 | 69 | Select `geom` button(4). Select `geom_bar`(5) among selections. Check the R code for the layer(6) and plot preview in the lower right corner. Press `Add Layer` button(7). 70 | 71 | plot of chunk unnamed-chunk-6 72 | 73 | 74 | ### Add geom_text() layer - standard method 75 | 76 | Select `geom_text`(8) among geoms. To map label, select `mapping` radioButton(9). Select `label` among aes(10) and select ..count.. among var(11). Select `count` as stat(12). Select `position_stack()` as position(13) and set vjust 0.5(14). Check the resultant R code for layer(15) and plot preview at lower right corner. Press `Add Layer` button(16). 77 | 78 | plot of chunk unnamed-chunk-7 79 | 80 | 81 | ### Add geom_text() layer - A shortcut 82 | 83 | I have made a shortcut in the ggplotAssist app. After adding the geom_bar() layer, select `geom_text`(8) among geoms. Press `Add Bar Label` button(9). The R code for labelling bar plot is made(10). Adjust vjust argument(11). 84 | 85 | plot of chunk unnamed-chunk-8 86 | 87 | ## Grouped Bar plot 88 | 89 | You can make a grouped bar plot by setting the position of geom_bar() to `dodge`. 90 | 91 | 92 | ```r 93 | ggplot(mtcars,aes(x=factor(cyl),fill=factor(gear)))+ 94 | geom_bar(position="dodge") 95 | ``` 96 | 97 | plot of chunk unnamed-chunk-9 98 | 99 | You can label the bar plot with geom_text() function. 100 | 101 | 102 | ```r 103 | ggplot(mtcars,aes(x=factor(cyl),fill=factor(gear)))+ 104 | geom_bar(position="dodge")+ 105 | geom_text(aes(label=..count..),stat='count',position=position_dodge(0.9)) 106 | ``` 107 | 108 | plot of chunk unnamed-chunk-10 109 | 110 | For fine adjustment of vertical position of label, you can adjust vjust argument of geom_text(). 111 | 112 | 113 | ```r 114 | ggplot(mtcars,aes(x=factor(cyl),fill=factor(gear)))+ 115 | geom_bar(position="dodge")+ 116 | geom_text(aes(label=..count..),stat='count',position=position_dodge(0.9),vjust=-0.2) 117 | ``` 118 | 119 | plot of chunk unnamed-chunk-11 120 | 121 | ## labelling grouped barplot with ggplotAssist 122 | 123 | ### Make a grouped barplot 124 | 125 | After mapping the x-axis and fill variables, select `geom_bar` among geoms(1). Set the position `dodge`(2). You can see the R code for layer(3). Press `Add Layer` button(4). 126 | 127 | plot of chunk unnamed-chunk-12 128 | 129 | ### Add label 130 | 131 | Select `geom_text`(5) among geoms. Press `Add Bar Label` button(6). Set the width argument of position_dodge 0.9(7). You can see the R code for this layer(8). Press `Add Layer` button(9). 132 | 133 | plot of chunk unnamed-chunk-13 134 | 135 | ## Proportional stacked bar plot 136 | 137 | You can make a proportional atacked bar plot by setting the position of geom_bar() `fill`. 138 | 139 | 140 | ```r 141 | ggplot(mtcars,aes(x=factor(cyl),fill=factor(gear)))+ 142 | geom_bar(position="fill") 143 | ``` 144 | 145 | plot of chunk unnamed-chunk-14 146 | 147 | You can label the bar plot with counts with geom_text() function. 148 | 149 | 150 | ```r 151 | ggplot(mtcars,aes(x=factor(cyl),fill=factor(gear)))+ 152 | geom_bar(position="fill")+ 153 | geom_text(aes(label=..count..),stat='count',position=position_fill(vjust=0.5)) 154 | ``` 155 | 156 | plot of chunk unnamed-chunk-15 157 | 158 | You can to make labels with ratios instead of counts with the following code. 159 | 160 | 161 | ```r 162 | ggplot(mtcars,aes(x=factor(cyl),fill=factor(gear)))+ 163 | geom_bar(position="fill")+ 164 | geom_text(aes(label=scales::percent(..count../sum(..count..))), 165 | stat='count',position=position_fill(vjust=0.5)) 166 | ``` 167 | 168 | plot of chunk unnamed-chunk-16 169 | 170 | To add labels with columnwise ratios, the first thing to do is to make another data summarizing columnwise ratio. 171 | 172 | 173 | ```r 174 | percentData <- mtcars %>% group_by(cyl) %>% count(gear) %>% 175 | mutate(ratio=scales::percent(n/sum(n))) 176 | percentData 177 | ``` 178 | 179 | ``` 180 | # A tibble: 8 x 4 181 | # Groups: cyl [3] 182 | cyl gear n ratio 183 | 184 | 1 4 3 1 9.1% 185 | 2 4 4 8 72.7% 186 | 3 4 5 2 18.2% 187 | 4 6 3 2 28.6% 188 | 5 6 4 4 57.1% 189 | 6 6 5 1 14.3% 190 | 7 8 3 12 85.7% 191 | 8 8 5 2 14.3% 192 | ``` 193 | 194 | With this data, make a label with geom_text() function. 195 | 196 | 197 | ```r 198 | ggplot(mtcars,aes(x=factor(cyl),fill=factor(gear)))+ 199 | geom_bar(position="fill")+ 200 | geom_text(data=percentData, aes(y=n,label=ratio), 201 | position=position_fill(vjust=0.5)) 202 | ``` 203 | 204 | plot of chunk unnamed-chunk-18 205 | 206 | ## Labelling a proportional stacked barplot with ggplotAssist 207 | 208 | ### Make a proportional stacked barplot 209 | 210 | After mapping the x-axis and fill variables, select `geom_bar` among geoms(1). Set the position `fill`(2). You can see the R code for layer(3). Press `Add Layer` button(4). 211 | 212 | plot of chunk unnamed-chunk-19 213 | 214 | ### Add label 215 | 216 | Select `geom_text`(5) among geoms. Press `Add Bar Label` button(6). A new data summarizing columnwise ratio is made automatically and inserted as preprocessing(7). With this data, the R code for this layer is made(8). Set the vjust argument of position_fill() 0.5(9). Press `Add Layer` button and you can get the plot. 217 | 218 | plot of chunk unnamed-chunk-20 219 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2: do not edit by hand 2 | 3 | export(ggplotAssist) 4 | export(selectizeInput3) 5 | export(splitData) 6 | export(textAreaInput4) 7 | export(textFunction) 8 | export(textFunctionInput) 9 | export(textInput4) 10 | export(uiOutput3) 11 | importFrom(dplyr,filter) 12 | importFrom(dplyr,lead) 13 | importFrom(dplyr,select) 14 | importFrom(editData,checkboxInput3) 15 | importFrom(editData,numericInput3) 16 | importFrom(editData,selectInput3) 17 | importFrom(editData,textInput3) 18 | importFrom(ggplot2,map_data) 19 | importFrom(grDevices,colors) 20 | importFrom(magrittr,"%>%") 21 | importFrom(miniUI,gadgetTitleBar) 22 | importFrom(miniUI,miniContentPanel) 23 | importFrom(miniUI,miniPage) 24 | importFrom(rstudioapi,getActiveDocumentContext) 25 | importFrom(rstudioapi,insertText) 26 | importFrom(scales,muted) 27 | importFrom(shiny,HTML) 28 | importFrom(shiny,NS) 29 | importFrom(shiny,actionButton) 30 | importFrom(shiny,animationOptions) 31 | importFrom(shiny,br) 32 | importFrom(shiny,browserViewer) 33 | importFrom(shiny,callModule) 34 | importFrom(shiny,checkboxInput) 35 | importFrom(shiny,column) 36 | importFrom(shiny,conditionalPanel) 37 | importFrom(shiny,dialogViewer) 38 | importFrom(shiny,div) 39 | importFrom(shiny,fluidPage) 40 | importFrom(shiny,fluidRow) 41 | importFrom(shiny,h3) 42 | importFrom(shiny,h4) 43 | importFrom(shiny,hr) 44 | importFrom(shiny,htmlOutput) 45 | importFrom(shiny,imageOutput) 46 | importFrom(shiny,modalButton) 47 | importFrom(shiny,modalDialog) 48 | importFrom(shiny,need) 49 | importFrom(shiny,numericInput) 50 | importFrom(shiny,observe) 51 | importFrom(shiny,observeEvent) 52 | importFrom(shiny,paneViewer) 53 | importFrom(shiny,plotOutput) 54 | importFrom(shiny,radioButtons) 55 | importFrom(shiny,reactive) 56 | importFrom(shiny,reactiveValues) 57 | importFrom(shiny,renderImage) 58 | importFrom(shiny,renderPlot) 59 | importFrom(shiny,renderPrint) 60 | importFrom(shiny,renderUI) 61 | importFrom(shiny,runApp) 62 | importFrom(shiny,runGadget) 63 | importFrom(shiny,selectInput) 64 | importFrom(shiny,selectizeInput) 65 | importFrom(shiny,showModal) 66 | importFrom(shiny,sliderInput) 67 | importFrom(shiny,stopApp) 68 | importFrom(shiny,tagList) 69 | importFrom(shiny,tags) 70 | importFrom(shiny,textAreaInput) 71 | importFrom(shiny,textInput) 72 | importFrom(shiny,titlePanel) 73 | importFrom(shiny,uiOutput) 74 | importFrom(shiny,updateCheckboxInput) 75 | importFrom(shiny,updateNumericInput) 76 | importFrom(shiny,updateRadioButtons) 77 | importFrom(shiny,updateSelectInput) 78 | importFrom(shiny,updateSelectizeInput) 79 | importFrom(shiny,updateSliderInput) 80 | importFrom(shiny,updateTextAreaInput) 81 | importFrom(shiny,updateTextInput) 82 | importFrom(shiny,validate) 83 | importFrom(shiny,verbatimTextOutput) 84 | importFrom(shinyAce,aceEditor) 85 | importFrom(shinyAce,updateAceEditor) 86 | importFrom(shinyWidgets,materialSwitch) 87 | importFrom(shinyWidgets,pickerInput) 88 | importFrom(shinyWidgets,radioGroupButtons) 89 | importFrom(shinyWidgets,updateMaterialSwitch) 90 | importFrom(shinyWidgets,updateRadioGroupButtons) 91 | importFrom(stringr,str_c) 92 | importFrom(stringr,str_detect) 93 | importFrom(stringr,str_extract) 94 | importFrom(stringr,str_extract_all) 95 | importFrom(stringr,str_length) 96 | importFrom(stringr,str_locate) 97 | importFrom(stringr,str_locate_all) 98 | importFrom(stringr,str_replace) 99 | importFrom(stringr,str_replace_all) 100 | importFrom(stringr,str_trim) 101 | importFrom(tibble,as_tibble) 102 | importFrom(utils,capture.output) 103 | -------------------------------------------------------------------------------- /NEWS.md: -------------------------------------------------------------------------------- 1 | # ggplotAssist 0.1.4 2 | ===================== 3 | (2017-Nov-13) 4 | 5 | * now support making rose plot from barplot 6 | 7 | 8 | # ggplotAssist 0.1.3 9 | ===================== 10 | (2017-Nov-12) 11 | 12 | * bug fixed 13 | 14 | * now support labelling geom_bar() or geom_col() 15 | 16 | # ggplotAssist 0.1.2 17 | ==================== 18 | (2017-Nov-5) 19 | 20 | * bug fixed 21 | 22 | * now support position_*() functions 23 | 24 | # ggplotAssist 0.1.1 25 | ==================== 26 | (2017-Nov-2) 27 | 28 | * new function "uiOutput3","textInput4","textAreaInput4" added 29 | 30 | * An recursive shiny module "textFunctionInput" and "textFunction" added 31 | 32 | * Two toy shiny apps included in "inst" folder 33 | 34 | # ggplotAssist 0.1.0 35 | ==================== 36 | (2017-Oct-24) 37 | 38 | * new function "ggplotAssist" added 39 | -------------------------------------------------------------------------------- /R/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardiomoon/ggplotAssist/1db61ade40f824ef42f027b6f4553ba46a325d05/R/.DS_Store -------------------------------------------------------------------------------- /R/sysdata.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardiomoon/ggplotAssist/1db61ade40f824ef42f027b6f4553ba46a325d05/R/sysdata.rda -------------------------------------------------------------------------------- /R/textFunction.R: -------------------------------------------------------------------------------- 1 | #' Create side-by side uiOutput 2 | #' 3 | #' @param ... arguments to be passed to uiOutput 4 | #' @export 5 | #' @examples 6 | #' library(shiny) 7 | #' # Only run examples in interactive R sessions 8 | #' if (interactive()) { 9 | #' ui <- fluidPage( 10 | #' textInput4("name","name",""), 11 | #' uiOutput3("test") 12 | #' ) 13 | #' server <- function(input, output) { 14 | #' 15 | #' } 16 | #' shinyApp(ui, server) 17 | #' } 18 | uiOutput3=function (...) { 19 | div(style = "display:inline-block;", uiOutput(...)) 20 | } 21 | 22 | 23 | #' Create side-by side textInput with disabled spell check 24 | #' 25 | #' @param inputId The input slot that will be used to access the value. 26 | #' @param label Display label for the control, or NULL for no label. 27 | #' @param value Initial value. 28 | #' @param width The width of the input in pixel 29 | #' @param bg backgroung color 30 | #' @param ... arguments to be passed to textInput 31 | #' @export 32 | #' @examples 33 | #' library(shiny) 34 | #' # Only run examples in interactive R sessions 35 | #' if (interactive()) { 36 | #' ui <- fluidPage( 37 | #' textInput4("id", "id", ""), 38 | #' textInput4("name","name","") 39 | #' ) 40 | #' server <- function(input, output) { 41 | #' 42 | #' } 43 | #' shinyApp(ui, server) 44 | #' } 45 | textInput4=function (inputId, label, value = "",width=100,bg=NULL,...) 46 | { 47 | style=paste0("width: ",width,"px;") 48 | if(!is.null(bg)) style=paste0(style,"background-color:",bg,";") 49 | div(style="display:inline-block;", 50 | if(label!="") tags$label(label, `for` = inputId), 51 | tags$input(id = inputId, type = "text", class="form-control",value = value, 52 | style=style,spellcheck="false",autocorrect="off",...)) 53 | } 54 | 55 | #' Create side-by side textAreaInput with disabled spell check 56 | #' 57 | #' @param inputId The input slot that will be used to access the value. 58 | #' @param label Display label for the control, or NULL for no label. 59 | #' @param value Initial value. 60 | #' @param width The width of the input in pixel 61 | #' @param bg backgroung color 62 | #' @param ... arguments to be passed to textInput 63 | #' @export 64 | #' @examples 65 | #' library(shiny) 66 | #' # Only run examples in interactive R sessions 67 | #' if (interactive()) { 68 | #' ui <- fluidPage( 69 | #' textAreaInput4("Code","Code","") 70 | #' ) 71 | #' server <- function(input, output) { 72 | #' 73 | #' } 74 | #' shinyApp(ui, server) 75 | #' } 76 | textAreaInput4=function (inputId, label, value = "",bg=NULL,width="100%",...) 77 | { 78 | style=paste0("width: ",width,";") 79 | if(!is.null(bg)) style=paste0(style,"background-color:",bg,";") 80 | div(class="form-group shiny-input-container", 81 | tags$style(type="text/css", "textarea {width:100%}"), 82 | if(!is.null(label)) tags$label(label, `for` = inputId), 83 | tags$textarea(id = inputId, value = value, 84 | style=style,spellcheck="false",autocorrect="off",...)) 85 | } 86 | 87 | # textareaInput<-function(inputId, label="",value="", rows=8, width=100){ 88 | # div(class="form-group shiny-input-container", 89 | # tags$style(type="text/css", "textarea {width:100%}"), 90 | # tags$textarea(id = inputId, placeholder = label, rows = rows, value=value, 91 | # style=paste("width: ",width,"px; display:inline-block;",sep="")) 92 | # ) 93 | # } 94 | 95 | 96 | 97 | #'Elongate data.frame with column split by comma 98 | #' 99 | #' @param df a data.frame 100 | #' @param colname column name 101 | #' @export 102 | #' @return An elongated data.frame 103 | splitData=function(df,colname){ 104 | 105 | if(nrow(df)==0){ 106 | result=df 107 | } else{ 108 | result=c() 109 | for(i in 1:nrow(df)){ 110 | 111 | if(str_detect(df[[colname]][i],",")){ 112 | valuechoice=unlist(strsplit(df[[colname]][i],",")) 113 | valuechoice=str_trim(valuechoice) 114 | for(j in 1:length(valuechoice)){ 115 | result=rbind(result,df[i,]) 116 | result[nrow(result),colname]=valuechoice[j] 117 | } 118 | } else{ 119 | result=rbind(result,df[i,]) 120 | } 121 | 122 | } 123 | } 124 | result 125 | } 126 | 127 | 128 | #' UI of textFunction shiny module 129 | #' @param id A string 130 | #' @importFrom shiny NS 131 | #' @export 132 | #' @examples 133 | #' library(ggplotAssist) 134 | #' library(shiny) 135 | #'# Only run examples in interactive R sessions 136 | #'if(interactive()){ 137 | #' ui=fluidPage( 138 | #' textFunctionInput("text"), 139 | #' textOutput("text") 140 | #') 141 | #'server=function(input,output,session){ 142 | #' rv=reactiveValues() 143 | #' rawData=read.csv("data-raw/setting.csv",stringsAsFactors = FALSE) 144 | #' settingData=splitData(rawData,"setting") 145 | #' rv$argList<-list(label="text",mode="text",value="element_text()",choices=NULL,width=200, 146 | #' bg="lightcyan",placeholder="") 147 | #' result=callModule(textFunction,"text",argList=reactive(rv$argList), 148 | #' editCode=reactive(TRUE),settingData=reactive(settingData)) 149 | #' output$text=renderText({ 150 | #' result() 151 | #' }) 152 | #'} 153 | #'shinyApp(ui,server) 154 | #'} 155 | textFunctionInput=function(id){ 156 | ns<-NS(id) 157 | 158 | tagList( 159 | uiOutput3(ns("functionInput")) 160 | 161 | ) 162 | } 163 | 164 | #' Server function of textFunction shiny module 165 | #' 166 | #' @param input input 167 | #' @param output output 168 | #' @param session session 169 | #' @param argList A list containing options 170 | #' @param editCode Logical. Wheter or not edit initial R code 171 | #' @param settingData A data.frame contains information about functions 172 | #' @importFrom shiny callModule 173 | #' @importFrom stringr str_extract 174 | #' @export 175 | textFunction=function(input,output,session,argList=reactive(argList), 176 | editCode=reactive(TRUE),settingData=reactive(NULL)){ 177 | 178 | rv=reactiveValues() 179 | 180 | rv$myArgs<-reactive(argList()) 181 | 182 | 183 | selectedData=reactive({ 184 | myOptions<-rv$myArgs() 185 | 186 | result<-NULL 187 | findob<-NULL 188 | 189 | if(editCode()){ 190 | 191 | if(!is.null(input$text)){ 192 | if(str_detect(input$text,"[^\\(]*\\(\\)")){ 193 | findob<-str_extract(input$text,"[^\\(]*\\(") 194 | findob 195 | findob<-unlist(strsplit(findob,"\\("))[1] 196 | } 197 | } 198 | } else { 199 | findob <-argList()$value 200 | } 201 | 202 | 203 | if(!is.null(findob)){ 204 | #find exact geom(not ...2, or ...n) 205 | findob<-paste0("^",findob) 206 | findob<-paste0(findob,"^2n|",findob,",|",findob,"$") 207 | result<-settingData()[str_detect(settingData()$geom,findob),] 208 | if(nrow(result)==0) result<-NULL 209 | } 210 | 211 | result 212 | }) 213 | 214 | 215 | output$functionInput=renderUI({ 216 | ns <- session$ns 217 | 218 | myOptions<-rv$myArgs() 219 | # cat("ns('text')=",ns("text"),"\n") 220 | tagList( 221 | if(myOptions$mode=="text") 222 | if(editCode()) 223 | textInput4(ns("text"),label=myOptions$label,value=myOptions$value, 224 | width=myOptions$width,bg=myOptions$bg, 225 | placeholder=myOptions$placeholder), 226 | if(myOptions$mode=="select") 227 | selectizeInput3(ns("text"),label=myOptions$label,choices=myOptions$choices, 228 | selected=myOptions$selected, 229 | width=myOptions$width,options=list(create=TRUE)), 230 | uiOutput3(ns("functionInput2")) 231 | ) 232 | 233 | 234 | }) 235 | 236 | output$functionInput2=renderUI({ 237 | ns <- session$ns 238 | count=0 239 | mylist=list() 240 | 241 | #myOptions<-rv$myArgs() 242 | no=1 243 | selected<-selectedData() 244 | if(!is.null(selected)) { 245 | count=nrow(selected) 246 | } 247 | if(count>0){ 248 | for(i in 1:count){ 249 | temp=selected$setting[i] 250 | value=selected$value[i] 251 | placeholder=selected$placeholder[i] 252 | mywidth=min((((max(nchar(value),nchar(placeholder))*8)%/%100)+1)*100,200) 253 | if(selected$input[i] %in% c("select","text")) { 254 | mylist[[no]]=textFunctionInput(ns(temp)) 255 | } else if(selected$input[i]=="numeric"){ 256 | mylist[[no]]= numericInput3(ns(temp),label=temp,value=as.numeric(value)) 257 | } else if(selected$input[i]=="checkbox"){ 258 | mylist[[no]]= checkboxInput3(ns(temp),label=temp,value=as.logical(value)) 259 | } 260 | #cat("ns(temp)=",ns(temp),"\n") 261 | no=no+1 262 | } 263 | 264 | } 265 | do.call(tagList,mylist) 266 | }) 267 | 268 | observeEvent(selectedData(),{ 269 | count=0 270 | selected<-selectedData() 271 | 272 | if(!is.null(selected)) { 273 | count=nrow(selected) 274 | } 275 | rv$result=list() 276 | if(count>0){ 277 | for(i in 1:count){ 278 | local({ 279 | j<-i 280 | temp=selected$setting[j] 281 | value=selected$value[j] 282 | placeholder=selected$placeholder[j] 283 | mywidth=min((((max(nchar(value),nchar(placeholder))*8)%/%100)+1)*100,200) 284 | rv$result[[j]]<-"" 285 | temp=selected$setting[j] 286 | if(!is.null(selected$input[j])){ 287 | if(selected$input[j]=="text") { 288 | argList=list(label=temp,mode="text",value=value,width=mywidth, 289 | bg="lightcyan",placeholder=placeholder) 290 | rv$result[[j]]<-callModule(textFunction,temp,argList=reactive(argList), 291 | editCode=reactive(TRUE),settingData=reactive(settingData())) 292 | } else if(selected$input[j]=="select"){ 293 | mychoices=unlist(strsplit(value,",",fixed=TRUE)) 294 | if(temp %in% c("colour","color","fill")){ 295 | mychoices=c(mychoices,colors()[!str_detect(colors(),mychoices)]) 296 | } 297 | if(length(mychoices)>0) 298 | mywidth=(((max(nchar(mychoices))*8)%/%100)+1)*100 299 | else mywidth=100 300 | argList=list(label=temp,mode="select",choices=mychoices, 301 | value=NULL,width=mywidth) 302 | rv$result[[j]]<-callModule(textFunction,temp,argList=reactive(argList), 303 | editCode=reactive(TRUE),settingData=reactive(settingData())) 304 | } 305 | 306 | } 307 | }) 308 | } 309 | } 310 | #str(rv$result) 311 | 312 | }) 313 | 314 | myfunction=reactive({ 315 | count=0 316 | code<-"" 317 | if(editCode()) code<-input$text 318 | myOptions<-rv$myArgs() 319 | 320 | 321 | selected<-selectedData() 322 | if(!is.null(selected)) { 323 | count=nrow(selected) 324 | } 325 | if(count>0){ 326 | 327 | tempcode="" 328 | result <- vector(mode = "list", length = count) 329 | for(i in 1:count){ 330 | temp=selected$setting[i] 331 | value=selected$value[i] 332 | valuechoice=unlist(strsplit(value,",")) 333 | valuechoice=str_trim(valuechoice) 334 | 335 | 336 | if(selected$input[i] %in% c("select","text")){ 337 | 338 | # cat(paste0("\nrv$result[[",i,"]]()=")) 339 | # str(rv$result[[i]]()) 340 | #cat("class(rv$result[[i]])=",class(rv$result[[i]]),"\n") 341 | resultCode<-NULL 342 | resultCode<-tryCatch(rv$result[[i]](),error=function(e) "error") 343 | #cat("resultCode=",resultCode,"\n") 344 | if(selected$input[i]=="select") defaultValue=valuechoice[1] 345 | else defaultValue=value 346 | if(!is.null(resultCode)){ 347 | # cat("resultCode=",resultCode,"\n") 348 | # cat("defaultValue=",defaultValue,"\n") 349 | if(!identical(resultCode,defaultValue)){ 350 | if(tempcode!="") tempcode=paste0(tempcode,",") 351 | if(selected$quoted[i]) tempcode=paste0(tempcode,temp,"='",resultCode,"'") 352 | else tempcode=paste0(tempcode,temp,"=",resultCode) 353 | } 354 | } 355 | } else{ 356 | if(!is.null(input[[temp]])){ 357 | if(input[[temp]]!=value){ 358 | if(tempcode!="") tempcode=paste0(tempcode,",") 359 | if(selected$quoted[i]) tempcode=paste0(tempcode,temp,"='",input[[temp]],"'") 360 | else tempcode=paste0(tempcode,temp,"=",input[[temp]]) 361 | } 362 | } 363 | } 364 | } 365 | 366 | if(editCode()) { 367 | code=str_extract(input$text,"[^\\(]*\\(") 368 | code=paste0(code,tempcode,")") 369 | } else{ 370 | code<-tempcode 371 | } 372 | 373 | 374 | } 375 | code 376 | }) 377 | return(myfunction) 378 | } 379 | 380 | 381 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "R package ggplotAssist" 3 | author: "Keon-Woong Moon" 4 | date: "2017-10-24" 5 | output: rmarkdown::html_vignette 6 | vignette: > 7 | %\VignetteIndexEntry{ggplotAssist} 8 | %\VignetteEngine{knitr::rmarkdown} 9 | %\VignetteEncoding{UTF-8} 10 | --- 11 | 12 | 13 | ``` 14 | The 'ggplotAssist' is an RStudio addin for teaching and learning plot generation using the 'ggplot2' package. You can learn each steps of plot generation - aesthetics mapping, select geometries, add scales, apply theme - by clicking your mouse without coding. You can see the resultant plot and see the each steps of plot layer by layer. You get resultant code for ggplot. 15 | ``` 16 | 17 | ## Prerequisite 18 | 19 | You have to install the developmental version of R package `editData` from github. 20 | 21 | 22 | ```r 23 | #install.packages("devtools") 24 | devtools::install_github("cardiomoon/editData") 25 | ``` 26 | 27 | ## Install package 28 | 29 | You can install `ggplotAssist` package from github. 30 | 31 | 32 | ```r 33 | #install.packages("devtools") 34 | devtools::install_github("cardiomoon/ggplotAssist") 35 | ``` 36 | 37 | ## Usage: As an RStudio Add-in 38 | 39 | This addin can be used to interactively generate a `ggplot` using `ggplot2` package. 40 | The intended way to use this is as follows: 41 | 42 | 1. Highlight a symbol naming a `data.frame` or a `tibble` in your R session, e.g. `msleep`(1). Execute this addin(arrow), to interactively manipulate it. 43 | 44 | plot of chunk unnamed-chunk-3 45 | 46 | 2. You can see a brower window. You can see the data name(1) and R code for ggplot(2). Select `x`(3) and `bodywt`(4) to map `bodywt` as a x-axis variable. 47 | 48 | plot of chunk unnamed-chunk-4 49 | 50 | 3. You can see the R code for ggplot(1). Select `y` and `brainwt` to map the y-axis variable. 51 | 52 | plot of chunk unnamed-chunk-5 53 | 54 | 4. To add geoms to ggplot, press `geom` button(1) and select `geom_point`(2). You can mapping or setting the aesthetics of geom_point. You can see the R code for this layer(3). In the lower part of window, you can see two R codes and two plots. In the lower left portion, you can see the R code for plot(4) and resultant plot(5). In the lower right portion, you can see the R code for plot with R code for layer under construction(6) and resultant plot(7). This is a plot preview. 55 | 56 | plot of chunk unnamed-chunk-6 57 | 58 | 5. If you finish to make a layer, press `Add Layer` button(1) to add the layer. You can see added layers(2). You can delete a layer with `delete layer` button after select a layer to delete. 59 | 60 | plot of chunk unnamed-chunk-7 61 | 62 | 6. To add theme, press `theme` button(1) and select `theme_bw`(2). You can see the code for theme_bw(3) and plot preview(4,5). Press `Add Layer` button(6) to add the code. 63 | plot of chunk unnamed-chunk-8 64 | 65 | 7. To apply a log scale to x-axis, press `scale` button(1) and select `scale_x_log10` function(2). You can set the arguments of scale_x_log10() function(3). You can see the code for scale(4) and plot preview(5,6). To add math format to the log scale, press `Add math-format` button(9). You can repeat this step to apply a log scale to y-axis. 66 | plot of chunk unnamed-chunk-9 67 | 68 | 8. You can add logticks to your plot. Press `annotate` button(1) and select annotation_logticks function(2). You can see the arguments and default values of this function(3). Set the side argument `trbl`(4). You can see the R code for this layer(5) and plot preview(6.7). Press `Add Layer` button(8) to add this layer. 69 | 70 | plot of chunk unnamed-chunk-10 71 | 72 | 9. You can hide the minor grid lines because they don't align with the ticks. Press `theme` button(1) and select the `theme` function(2). The `theme()` function has a lot of arguments. Select `panel.grid.minor` argument(3) and select `element_blank()`(4) to hide the minor grid line. 73 | 74 | plot of chunk unnamed-chunk-11 75 | 76 | 10. You can see this plot layer by layer. Press the `Layer by layer` button(1) and use the sliderInput to see the plot layer by layer. You can animate this plot by click the arrowhead(2). If you want to get this R code for plot, press `Done` button(3). 77 | 78 | plot of chunk unnamed-chunk-12 79 | 80 | 11. When you're done, the code for the ggplot will be emitted at the cursor position(scarlet rectangle). 81 | 82 | plot of chunk unnamed-chunk-13 83 | 84 | ## Usage: As a regular function 85 | 86 | You can use the `ggplotAssist()` function as a regular function, e.g. in a command line. 87 | 88 | 89 | ```r 90 | result <- ggplotAssist(mtcars) 91 | ``` 92 | 93 | # Other topics 94 | 95 | ## How to use guide_colorbar()? 96 | 97 | 98 | http://rpubs.com/cardiomoon/322415 99 | 100 | ## Recursive shiny module for functionals 101 | 102 | 103 | There are many functions that takes a function as an input : **Functionals**. To handle a functional in a shiny app, you have to make a shiny module that allows **recursive** call. I have included an recursive shiny module `textFunction` in my package ggplotAssist. The UI of textFunction shiny module is `textFunctionInput` and the server function is `textFunction`. I also included two toy shiny app to demonstrate the recursive shiny module. 104 | 105 | You can read the full story at https://github.com/cardiomoon/ggplotAssist/blob/master/textFunctionInput.md 106 | 107 | ## Labelling Barplot 108 | 109 | https://github.com/cardiomoon/ggplotAssist/blob/master/LabellingBarplot.md 110 | -------------------------------------------------------------------------------- /cran-comments.md: -------------------------------------------------------------------------------- 1 | This is an update of the package 'ggplotAssist'. 2 | 3 | 1) I had added an recursive shiny module "textFunctionInput" and "textFunction". 4 | 5 | 2) I have added several new functions. 6 | 7 | 3) I have added two toy shiny apps in the `inst` folder. 8 | 9 | 4) Several bugs fixed. 10 | 11 | 12 | ## Test environments 13 | * local OS X install, R 3.4.2 14 | * win-builder (devel and release) 15 | 16 | ## R CMD check results 17 | There were no ERRORs or WARNINGs. 18 | 19 | -------------------------------------------------------------------------------- /data-raw/all.csv: -------------------------------------------------------------------------------- 1 | "geom","setting","input","value","quoted","placeholder","group" 2 | "geom_contour","lineend","select","round,butt,square",TRUE,"",NA 3 | "geom_path","linejoin","select","round,mitre,bevel",TRUE,"",NA 4 | "geom_contour","linejoin","select","round,mitre,bevel",TRUE,"",NA 5 | "geom_density2d","linejoin","select","round,mitre,bevel",TRUE,"",NA 6 | "geom_density_2d","linejoin","select","round,mitre,bevel",TRUE,"",NA 7 | "geom_quantile","linejoin","select","round,mitre,bevel",TRUE,"",NA 8 | "stat_quantile","linejoin","select","round,mitre,bevel",TRUE,"",NA 9 | "geom_path","linemitre","numeric","1",FALSE,"",NA 10 | "geom_contour","linemitre","numeric","1",FALSE,"",NA 11 | "geom_denisty2d","linemitre","numeric","1",FALSE,"",NA 12 | "geom_density_2d","linemitre","numeric","1",FALSE,"",NA 13 | "geom_quantile","linemitre","numeric","1",FALSE,"",NA 14 | "geom_path","arrow","text","",FALSE,"arrow()",NA 15 | "geom_segment","arrow","text","",FALSE,"arrow()",NA 16 | "geom_curve","arrow","text","",FALSE,"arrow()",NA 17 | "geom_step","direction","select","hv,vh",TRUE,"",NA 18 | "geom_smooth","method","select","auto,lm,glm,gam,loess,rlm",TRUE,"",NA 19 | "stat_smooth","method","select","auto,lm,glm,gam,loess,rlm",TRUE,"",NA 20 | "geom_smooth","formula","text","y~x",FALSE,"",NA 21 | "stat_smooth","formula","text","y~x",FALSE,"",NA 22 | "geom_smooth","se","checkbox","TRUE",FALSE,"",NA 23 | "stat_smooth","se","checkbox","TRUE",FALSE,"",NA 24 | "facet_wrap","scales","select","fixed,free_x,free_y,free",TRUE,NA,NA 25 | "facet_grid","scales","select","fixed,free_x,free_y,free",TRUE,NA,NA 26 | "facet_wrap","nrow","text","",FALSE,"NULL",NA 27 | "facet_wrap","ncol","text","",FALSE,"NULL",NA 28 | "facet_grid","space","select","fixed,free_x,free_y,free",TRUE,"",NA 29 | "facet_grid","margins","checkbox","FALSE",FALSE,NA,NA 30 | "facet_wrap","labeller","select","label_value,label_both,label_context,label_parsed,label_wrap_gen(),label_bquote()",FALSE,"",NA 31 | "geom_text","parse","checkbox","FALSE",FALSE,"",NA 32 | "geom_label","parse","checkbox","FALSE",FALSE,"",NA 33 | "geom_text","nudge_x","numeric","0",FALSE,"",NA 34 | "geom_label","nudge_x","numeric","0",FALSE,"",NA 35 | "geom_text","nudge_y","numeric","0",FALSE,"",NA 36 | "geom_label","nudge_y","numeric","0",FALSE,"",NA 37 | "geom_text","check_overlap","checkbox","FALSE",FALSE,"",NA 38 | "stat_bin_2d","bins","text","30",FALSE,"",NA 39 | "geom_contour","bins","text","30",FALSE,"",NA 40 | "geom_hex","bins","text","30",FALSE,"",NA 41 | "stat_bin_hex","bins","text","30",FALSE,"",NA 42 | "geom_bin2d","binwidth","text","",FALSE,"",NA 43 | "stat_bin_2d","binwidth","text","",FALSE,"",NA 44 | "geom_contour","binwidth","text","",FALSE,"",NA 45 | "geom_histogram","binwidth","text","",FALSE,"",NA 46 | "stat_bin","binwidth","text","",FALSE,"",NA 47 | "geom_freqpoly","binwidth","text","",FALSE,"",NA 48 | "geom_bar","width","text","",FALSE,"",NA 49 | "geom_col","width","text","",FALSE,"",NA 50 | "stat_count","width","text","",FALSE,"",NA 51 | "geom_boxplot","outlier.colour","text","",TRUE,"",NA 52 | "geom_boxplot","outlier.fill","text","",TRUE,"",NA 53 | "geom_boxplot","outlier.shape","numeric","19",FALSE,"",NA 54 | "geom_boxplot","outlier.size","numeric","1.5",FALSE,"",NA 55 | "geom_boxplot","outlier.stroke","numeric","0.5",FALSE,"",NA 56 | "geom_boxplot","outlier.alpha","numeric","1",FALSE,"",NA 57 | "geom_boxplot","notch","checkbox","FALSE",FALSE,"",NA 58 | "geom_boxplot","notchwidth","numeric","0.5",FALSE,"",NA 59 | "geom_boxplot","varwidth","checkbox","FALSE",FALSE,"",NA 60 | "geom_crossbar","fatten","numeric","2.5",FALSE,"",NA 61 | "geom_pointrange","fatten","numeric","4",FALSE,"",NA 62 | "geom_segment","lineend","select","butt,round,square",TRUE,"",NA 63 | "geom_curve","lineend","select","butt,round,square",TRUE,"",NA 64 | "geom_density_2d","lineend","select","butt,round,square",TRUE,"",NA 65 | "geom_density2d","lineend","select","butt,round,square",TRUE,"",NA 66 | "geom_path","lineend","select","butt,round,square",TRUE,"",NA 67 | "geom_quantile","lineend","select","butt,round,square",TRUE,"",NA 68 | "stat_quantile","lineend","select","butt,round,square",TRUE,"",NA 69 | "geom_curve","curvature","numeric","0.5",FALSE,"",NA 70 | "geom_curve","angle","numeric","90",FALSE,"",NA 71 | "geom_curve","ncp","numeric","5",FALSE,"",NA 72 | "stat_density","bw","select","nrd0,nrd,ucv,bcv,SJ",TRUE,"",NA 73 | "geom_density","bw","select","nrd0,nrd,ucv,bcv,SJ",TRUE,"",NA 74 | "geom_violin","bw","select","nrd0,nrd,ucv,bcv,SJ",TRUE,"",NA 75 | "stat_ydensity","bw","select","nrd0,nrd,ucv,bcv,SJ",TRUE,"",NA 76 | "stat_density","adjust","numeric","1",FALSE,"",NA 77 | "geom_density","adjust","numeric","1",FALSE,"",NA 78 | "geom_violin","adjust","numeric","1",FALSE,"",NA 79 | "stat_ydensity","adjust","numeric","1",FALSE,"",NA 80 | "stat_density","kernel","select","gaussian,epanechnikov,rectangular,triangular,biweight,cosine,optcosine",TRUE,"",NA 81 | "geom_density","kernel","select","gaussian,epanechnikov,rectangular,triangular,biweight,cosine,optcosine",TRUE,"",NA 82 | "geom_violin","kernel","select","gaussian,epanechnikov,rectangular,triangular,biweight,cosine,optcosine",TRUE,"",NA 83 | "stat_ydensity","kernel","select","gaussian,epanechnikov,rectangular,triangular,biweight,cosine,optcosine",TRUE,"",NA 84 | "stat_density","n","numeric","512",FALSE,"",NA 85 | "geom_density","n","numeric","512",FALSE,"",NA 86 | "geom_density","trim","checkbox","FALSE",FALSE,"",NA 87 | "stat_density","trim","checkbox","FALSE",FALSE,"",NA 88 | "stat_density_2d","contour","checkbox","TRUE",FALSE,"",NA 89 | "stat_density_2d","n","numeric","100",FALSE,"",NA 90 | "stat_density_2d","h","text","",FALSE,"",NA 91 | "geom_dotplot","binwidth","text","",FALSE,"",NA 92 | "geom_hex","binwidth","text","",FALSE,"",NA 93 | "stat_bin_hex","binwidth","text","",FALSE,"",NA 94 | "geom_dotplot","binaxis","select","x,y",TRUE,"",NA 95 | "geom_dotplot","method","select","dotdensity,histodot",TRUE,"",NA 96 | "geom_dotplot","binpositions","select","bygroup,all",TRUE,"",NA 97 | "geom_dotplot","stackdir","select","up,down,center,centerwhole",TRUE,"",NA 98 | "geom_dotplot","stackratio","numeric","1",FALSE,"",NA 99 | "geom_dotplot","dotsize","numeric","1",FALSE,"",NA 100 | "geom_dotplot","stackgroups","checkbox","FALSE",FALSE,"",NA 101 | "geom_dotplot","origin","text","",FALSE,"",NA 102 | "geom_dotplot","right","checkbox","TRUE",FALSE,"",NA 103 | "geom_dotplot","width","numeric","0.9",FALSE,"",NA 104 | "stat_bin","bins","text","",FALSE,"",NA 105 | "geom_freqpoly","bins","text","",FALSE,"",NA 106 | "geom_histogram","bins","text","",FALSE,"",NA 107 | "stat_bin","center","text","",FALSE,"",NA 108 | "geom_freqpoly","center","text","",FALSE,"",NA 109 | "geom_histogram","center","text","",FALSE,"",NA 110 | "stat_bin","boundary","text","",FALSE,"",NA 111 | "geom_freqpoly","boundary","text","",FALSE,"",NA 112 | "geom_histogram","boundary","text","",FALSE,"",NA 113 | "stat_bin","breaks","text","",FALSE,"",NA 114 | "geom_freqpoly","breaks","text","",FALSE,"",NA 115 | "geom_histogram","breaks","text","",FALSE,"",NA 116 | "stat_bin","closed","select","right,left",TRUE,"",NA 117 | "geom_freqpoly","closed","select","right,left",TRUE,"",NA 118 | "geom_histogram","closed","select","right,left",TRUE,"",NA 119 | "stat_bin","pad","checkbox","FALSE",FALSE,"",NA 120 | "geom_freqpoly","pad","checkbox","FALSE",FALSE,"",NA 121 | "geom_histogram","pad","checkbox","FALSE",FALSE,"",NA 122 | "geom_jitter","width","numeric","0.4",FALSE,"",NA 123 | "geom_jitter","height","numeric","0.4",FALSE,"",NA 124 | "geom_label","label.padding","text","unit(0.25, ""lines"")",FALSE,"unit(0.25, ""lines"")",NA 125 | "geom_label","label.r","text","unit(0.15, ""lines"")",FALSE,"unit(0.15, ""lines"")",NA 126 | "geom_label","label.size","numeric","0.25",FALSE,"",NA 127 | "geom_map","map","text","",FALSE,"",NA 128 | "geom_qq","distribution","text","stats::qnorm",FALSE,"",NA 129 | "stat_qq","distribution","text","stats::qnorm",FALSE,"",NA 130 | "geom_qq","dparam","text","list()",FALSE,"",NA 131 | "stat_qq","dparam","text","list()",FALSE,"",NA 132 | "stat_quantile","quantiles","text","c(0.25,0.5,0.75)",FALSE,"",NA 133 | "geom_quantile","quantiles","text","c(0.25,0.5,0.75)",FALSE,"",NA 134 | "stat_quantile","formula","text","",FALSE,"",NA 135 | "geom_quantile","formula","text","",FALSE,"",NA 136 | "stat_quantile","method","select","rq,rqss",TRUE,"",NA 137 | "geom_quantile","method","select","rq,rqss",TRUE,"",NA 138 | "stat_quantile","method.args","text","list()",FALSE,"",NA 139 | "geom_quantile","method.args","text","list()",FALSE,"",NA 140 | "geom_raster","hjust","numeric","0.5",FALSE,"",NA 141 | "geom_raster","vjust","numeric","0.5",FALSE,"",NA 142 | "geom_raster","interpolate","checkbox","FALSE",FALSE,"",NA 143 | "geom_rug","sides","text","bl",TRUE,"",NA 144 | "stat_smooth","n","numeric","80",FALSE,"",NA 145 | "geom_smooth","n","numeric","80",FALSE,"",NA 146 | "stat_smooth","span","numeric","0.75",FALSE,"",NA 147 | "geom_smooth","span","numeric","0.75",FALSE,"",NA 148 | "stat_smooth","fullrange","checkbox","FALSE",FALSE,"",NA 149 | "geom_smooth","fullrange","checkbox","FALSE",FALSE,"",NA 150 | "stat_smooth","level","numeric","0.95",FALSE,"",NA 151 | "geom_smooth","level","numeric","0.95",FALSE,"",NA 152 | "stat_smooth","method.args","text","list()",FALSE,"",NA 153 | "geom_smooth","method.args","text","list()",FALSE,"",NA 154 | "geom_violin","draw_quantiles","text","",FALSE,"",NA 155 | "stat_ydensity","draw_quantiles","text","",FALSE,"",NA 156 | "geom_violin","trim","checkbox","TRUE",FALSE,"",NA 157 | "stat_ydensity","trim","checkbox","TRUE",FALSE,"",NA 158 | "geom_violin","scale","select","area,count,width",TRUE,"",NA 159 | "stat_ydensity","scale","select","area,count,width",TRUE,"",NA 160 | "guide_legend","title","text","",TRUE,"waiver()",NA 161 | "guide_colorbar","title","text","",TRUE,"waiver()",NA 162 | "guide_legend","title.position","select",",top,bottom,left,right",TRUE,"",NA 163 | "guide_colorbar","title.position","select",",top,bottom,left,right",TRUE,"",NA 164 | "guide_legend","title.theme","text","",FALSE,"element_text()",NA 165 | "guide_colorbar","title.theme","text","",FALSE,"element_text()",NA 166 | "guide_legend","title.hjust","text","",FALSE,"",NA 167 | "guide_colorbar","title.hjust","text","",FALSE,"",NA 168 | "guide_legend","title.vjust","text","",FALSE,"",NA 169 | "guide_colorbar","title.vjust","text","",FALSE,"",NA 170 | "guide_legend","label","checkbox","TRUE",FALSE,"",NA 171 | "guide_colorbar","label","checkbox","TRUE",FALSE,"",NA 172 | "guide_legend","label.position","select",",top,bottom,left,right",TRUE,"",NA 173 | "guide_colorbar","label.position","select",",top,bottom,left,right",TRUE,"",NA 174 | "guide_legend","label.theme","text","",FALSE,"element_text()",NA 175 | "guide_colorbar","label.theme","text","",FALSE,"element_text()",NA 176 | "guide_legend","label.hjust","text","",FALSE,"",NA 177 | "guide_colorbar","label.hjust","text","",FALSE,"",NA 178 | "guide_legend","label.vjust","text","",FALSE,"",NA 179 | "guide_colorbar","label.vjust","text","",FALSE,"",NA 180 | "<<<<<<< HEAD","","","",NA,"",NA 181 | "guide_legend","keywidth","text","",FALSE,"A numeric or a unit() object",NA 182 | "guide_legend","keyheight","text","",FALSE,"A numeric or a unit() object",NA 183 | "=======","","","",NA,"",NA 184 | ">>>>>>> 911378438e589cebd0bfb14b730ef66d38ebdbeb","","","",NA,"",NA 185 | "guide_legend","direction","select",",horizontal,vertical",TRUE,"",NA 186 | "guide_colorbar","direction","select",",horizontal,vertical",TRUE,"",NA 187 | "guide_legend","default.unit","select","line,npc,cm,inches,mm,points,picas,bigpts,dida,cicero,scaledpts,lines,char,native,snpc,strwidth,strheight,grobwidth,grobheight",TRUE,"",NA 188 | "guide_colorbar","default.unit","select","line,npc,cm,inches,mm,points,picas,bigpts,dida,cicero,scaledpts,lines,char,native,snpc,strwidth,strheight,grobwidth,grobheight",TRUE,"",NA 189 | "guide_legend","override.aes","text","list()",FALSE,"",NA 190 | "guide_legend","nrow","text","",FALSE,"",NA 191 | "guide_legend","ncol","text","",FALSE,"",NA 192 | "guide_legend","byrow","checkbox","FALSE",FALSE,"",NA 193 | "guide_legend","reverse","checkbox","FALSE",FALSE,"",NA 194 | "guide_colorbar","reverse","checkbox","FALSE",FALSE,"",NA 195 | "guide_legend","order","text","0",FALSE,"",NA 196 | "guide_colorbar","order","text","0",FALSE,"",NA 197 | "guide_colorbar","barwidth","text","",FALSE,"A numeric or a unit() object",NA 198 | "guide_colorbar","barheight","text","",FALSE,"A numeric or a unit() object",NA 199 | "guide_colorbar","nbin","numeric","20",FALSE,"",NA 200 | "guide_colorbar","raster","checkbox","TRUE",FALSE,"",NA 201 | "guide_colorbar","ticks","checkbox","TRUE",FALSE,"",NA 202 | "guide_colorbar","draw.ulim","checkbox","TRUE",FALSE,"",NA 203 | "guide_colorbar","draw.llim","checkbox","TRUE",FALSE,"",NA 204 | "scale_x_continuous","name","text","",TRUE,"waiver()",NA 205 | "scale_y_continuous","name","text","",TRUE,"waiver()",NA 206 | "scale_x_log10","name","text","",TRUE,"waiver()",NA 207 | "scale_y_log10","name","text","",TRUE,"waiver()",NA 208 | "scale_x_reverse","name","text","",TRUE,"waiver()",NA 209 | "scale_y_reverse","name","text","",TRUE,"waiver()",NA 210 | "scale_x_sqrt","name","text","",TRUE,"waiver()",NA 211 | "scale_y_sqrt","name","text","",TRUE,"waiver()",NA 212 | "scale_x_continuous","breaks","text","",FALSE,"waiver()",NA 213 | "scale_y_continuous","breaks","text","",FALSE,"waiver()",NA 214 | "scale_x_log10","breaks","text","",FALSE,"waiver()",NA 215 | "scale_y_log10","breaks","text","",FALSE,"waiver()",NA 216 | "scale_x_reverse","breaks","text","",FALSE,"waiver()",NA 217 | "scale_y_reverse","breaks","text","",FALSE,"waiver()",NA 218 | "scale_x_sqrt","breaks","text","",FALSE,"waiver()",NA 219 | "scale_y_sqrt","breaks","text","",FALSE,"waiver()",NA 220 | "scale_x_continuous","minor_breaks","text","",FALSE,"waiver()",NA 221 | "scale_y_continuous","minor_breaks","text","",FALSE,"waiver()",NA 222 | "scale_x_log10","minor_breaks","text","",FALSE,"waiver()",NA 223 | "scale_y_log10","minor_breaks","text","",FALSE,"waiver()",NA 224 | "scale_x_reverse","minor_breaks","text","",FALSE,"waiver()",NA 225 | "scale_y_reverse","minor_breaks","text","",FALSE,"waiver()",NA 226 | "scale_x_sqrt","minor_breaks","text","",FALSE,"waiver()",NA 227 | "scale_y_sqrt","minor_breaks","text","",FALSE,"waiver()",NA 228 | "scale_x_continuous","labels","text","",FALSE,"waiver()",NA 229 | "scale_y_continuous","labels","text","",FALSE,"waiver()",NA 230 | "scale_x_log10","labels","text","",FALSE,"waiver()",NA 231 | "scale_y_log10","labels","text","",FALSE,"waiver()",NA 232 | "scale_x_reverse","labels","text","",FALSE,"waiver()",NA 233 | "scale_y_reverse","labels","text","",FALSE,"waiver()",NA 234 | "scale_x_sqrt","labels","text","",FALSE,"waiver()",NA 235 | "scale_y_sqrt","labels","text","",FALSE,"waiver()",NA 236 | "scale_x_continuous","limits","text","",FALSE,"NULL",NA 237 | "scale_y_continuous","limits","text","",FALSE,"NULL",NA 238 | "scale_x_log10","limits","text","",FALSE,"NULL",NA 239 | "scale_y_log10","limits","text","",FALSE,"NULL",NA 240 | "scale_x_reverse","limits","text","",FALSE,"NULL",NA 241 | "scale_y_reverse","limits","text","",FALSE,"NULL",NA 242 | "scale_x_sqrt","limits","text","",FALSE,"NULL",NA 243 | "scale_y_sqrt","limits","text","",FALSE,"NULL",NA 244 | "scale_x_continuous","expand","text","",FALSE,"waiver()",NA 245 | "scale_y_continuous","expand","text","",FALSE,"waiver()",NA 246 | "scale_x_log10","expand","text","",FALSE,"waiver()",NA 247 | "scale_y_log10","expand","text","",FALSE,"waiver()",NA 248 | "scale_x_reverse","expand","text","",FALSE,"waiver()",NA 249 | "scale_y_reverse","expand","text","",FALSE,"waiver()",NA 250 | "scale_x_sqrt","expand","text","",FALSE,"waiver()",NA 251 | "scale_y_sqrt","expand","text","",FALSE,"waiver()",NA 252 | "scale_x_continuous","oob","text","censor",FALSE,"",NA 253 | "scale_y_continuous","oob","text","censor",FALSE,"",NA 254 | "scale_x_log10","oob","text","censor",FALSE,"",NA 255 | "scale_y_log10","oob","text","censor",FALSE,"",NA 256 | "scale_x_reverse","oob","text","censor",FALSE,"",NA 257 | "scale_y_reverse","oob","text","censor",FALSE,"",NA 258 | "scale_x_sqrt","oob","text","censor",FALSE,"",NA 259 | "scale_y_sqrt","oob","text","censor",FALSE,"",NA 260 | "scale_x_continuous","na.value","text","NA_real_",FALSE,"",NA 261 | "scale_y_continuous","na.value","text","NA_real_",FALSE,"",NA 262 | "scale_x_log10","na.value","text","NA_real_",FALSE,"",NA 263 | "scale_y_log10","na.value","text","NA_real_",FALSE,"",NA 264 | "scale_x_reverse","na.value","text","NA_real_",FALSE,"",NA 265 | "scale_y_reverse","na.value","text","NA_real_",FALSE,"",NA 266 | "scale_x_sqrt","na.value","text","NA_real_",FALSE,"",NA 267 | "scale_y_sqrt","na.value","text","NA_real_",FALSE,"",NA 268 | "scale_x_continuous","trans","select","identity,asn,atanh,boxcox,exp,log,log10,log1p,log2,logit,probability,probit,reciprocal,reverse,sqrt",TRUE,"",NA 269 | "scale_y_continuous","trans","select","identity,asn,atanh,boxcox,exp,log,log10,log1p,log2,logit,probability,probit,reciprocal,reverse,sqrt",TRUE,"",NA 270 | "scale_x_continuous","trans","select","identity,asn,atanh,boxcox,exp,log,log10,log1p,log2,logit,probability,probit,reciprocal,reverse,sqrt",TRUE,"",NA 271 | "scale_y_continuous","trans","select","identity,asn,atanh,boxcox,exp,log,log10,log1p,log2,logit,probability,probit,reciprocal,reverse,sqrt",TRUE,"",NA 272 | "scale_x_reverse","trans","select","identity,asn,atanh,boxcox,exp,log,log10,log1p,log2,logit,probability,probit,reciprocal,reverse,sqrt",TRUE,"",NA 273 | "scale_y_reverse","trans","select","identity,asn,atanh,boxcox,exp,log,log10,log1p,log2,logit,probability,probit,reciprocal,reverse,sqrt",TRUE,"",NA 274 | "scale_radius","trans","select","identity,asn,atanh,boxcox,exp,log,log10,log1p,log2,logit,probability,probit,reciprocal,reverse,sqrt",TRUE,"",NA 275 | "scale_size","trans","select","identity,asn,atanh,boxcox,exp,log,log10,log1p,log2,logit,probability,probit,reciprocal,reverse,sqrt",TRUE,"",NA 276 | "scale_x_continuous","position","select","bottom,top",TRUE,"",NA 277 | "scale_x_log10","position","select","bottom,top",TRUE,"",NA 278 | "scale_x_reverse","position","select","bottom,top",TRUE,"",NA 279 | "scale_x_sqrt","position","select","bottom,top",TRUE,"",NA 280 | "scale_y_continuous","position","select","left,right",TRUE,"",NA 281 | "scale_y_log10","position","select","left,right",TRUE,"",NA 282 | "scale_y_reverse","position","select","left,right",TRUE,"",NA 283 | "scale_y_sqrt","position","select","left,right",TRUE,"",NA 284 | "scale_x_continuous","sec.axis","text","",FALSE,"waiver()",NA 285 | "scale_y_continuous","sec.axis","text","",FALSE,"waiver()",NA 286 | "scale_x_log10","sec.axis","text","",FALSE,"waiver()",NA 287 | "scale_y_log10","sec.axis","text","",FALSE,"waiver()",NA 288 | "scale_x_reverse","sec.axis","text","",FALSE,"waiver()",NA 289 | "scale_y_reverse","sec.axis","text","",FALSE,"waiver()",NA 290 | "scale_x_sqrt","sec.axis","text","",FALSE,"waiver()",NA 291 | "scale_y_sqrt","sec.axis","text","",FALSE,"waiver()",NA 292 | "scale_colour_brewer","type","select","seq,div,qual",TRUE,"",NA 293 | "scale_fill_brewer","type","select","seq,div,qual",TRUE,"",NA 294 | "scale_colour_distiller","type","select","seq,div,qual",TRUE,"",NA 295 | "scale_fill_distiller","type","select","seq,div,qual",TRUE,"",NA 296 | "scale_colour_brewer","palette","select","1,BrBG,PiYG,PRGn,PuOr,RdBu,RdGy,RdYlBu,RdYlGn,Spectral,Accent,Dark2,Paired,Pastel1,Pastel2,Set1,Set2,Set3,Blues,BuGn,BuPu,GnBu,Greens,Greys,Oranges,OrRd,PuBu,PuBuGn,PuRd,Purples,RdPu,Reds,YlGn,YlGnBu,YlOrBr,YlOrRd",TRUE,"",NA 297 | "scale_fill_brewer","palette","select","1,BrBG,PiYG,PRGn,PuOr,RdBu,RdGy,RdYlBu,RdYlGn,Spectral,Accent,Dark2,Paired,Pastel1,Pastel2,Set1,Set2,Set3,Blues,BuGn,BuPu,GnBu,Greens,Greys,Oranges,OrRd,PuBu,PuBuGn,PuRd,Purples,RdPu,Reds,YlGn,YlGnBu,YlOrBr,YlOrRd",TRUE,"",NA 298 | "scale_colour_distiller","palette","select","1,BrBG,PiYG,PRGn,PuOr,RdBu,RdGy,RdYlBu,RdYlGn,Spectral,Accent,Dark2,Paired,Pastel1,Pastel2,Set1,Set2,Set3,Blues,BuGn,BuPu,GnBu,Greens,Greys,Oranges,OrRd,PuBu,PuBuGn,PuRd,Purples,RdPu,Reds,YlGn,YlGnBu,YlOrBr,YlOrRd",TRUE,"",NA 299 | "scale_fill_distiller","palette","select","1,BrBG,PiYG,PRGn,PuOr,RdBu,RdGy,RdYlBu,RdYlGn,Spectral,Accent,Dark2,Paired,Pastel1,Pastel2,Set1,Set2,Set3,Blues,BuGn,BuPu,GnBu,Greens,Greys,Oranges,OrRd,PuBu,PuBuGn,PuRd,Purples,RdPu,Reds,YlGn,YlGnBu,YlOrBr,YlOrRd",TRUE,"",NA 300 | "scale_colour_brewer","direction","text","1",FALSE,"",NA 301 | "scale_fill_brewer","direction","text","1",FALSE,"",NA 302 | "scale_colour_distiller","direction","text","-1",FALSE,"",NA 303 | "scale_fill_distiller","direction","text","-1",FALSE,"",NA 304 | "scale_colour_distiller","values","text","",FALSE,"NULL",NA 305 | "scale_fill_distiller","values","text","",FALSE,"NULL",NA 306 | "scale_colour_distiller","space","text","Lab",TRUE,"",NA 307 | "scale_fill_distiller","space","text","Lab",TRUE,"",NA 308 | "scale_colour_distiller","na.values","text","grey50",TRUE,"",NA 309 | "scale_fill_distiller","na.values","text","grey50",TRUE,"",NA 310 | "scale_colour_distiller","guide","select","colourbar,legend",TRUE,"",NA 311 | "scale_fill_distiller","guide","select","colourbar,legend",TRUE,"",NA 312 | "scale_colour_grey","start","text","0.2",FALSE,"",NA 313 | "scale_fill_grey","start","text","0.2",FALSE,"",NA 314 | "scale_colour_grey","end","text","0.8",FALSE,"",NA 315 | "scale_fill_grey","end","text","0.8",FALSE,"",NA 316 | "scale_colour_grey","na.value","text","red",TRUE,"",NA 317 | "scale_fill_grey","na.value","text","red",TRUE,"",NA 318 | "scale_colour_gradient","low","text","#132B43",TRUE,"",NA 319 | "scale_fill_gradient","low","text","#132B43",TRUE,"",NA 320 | "scale_colour_gradient","high","text","#56B1F7",TRUE,"",NA 321 | "scale_fill_gradient","high","text","#56B1F7",TRUE,"",NA 322 | "scale_colour_gradient","space","select","Lab",TRUE,"",NA 323 | "scale_fill_gradient","space","select","Lab",TRUE,"",NA 324 | "scale_colour_gradient2","space","select","Lab",TRUE,"",NA 325 | "scale_fill_gradient2","space","select","Lab",TRUE,"",NA 326 | "scale_colour_gradientn","space","select","Lab",TRUE,"",NA 327 | "scale_fill_gradientn","space","select","Lab",TRUE,"",NA 328 | "scale_colour_gradient","na.value","text","grey50",TRUE,"",NA 329 | "scale_fill_gradient","na.value","text","grey50",TRUE,"",NA 330 | "scale_colour_gradient2","na.value","text","grey50",TRUE,"",NA 331 | "scale_fill_gradient2","na.value","text","grey50",TRUE,"",NA 332 | "scale_colour_gradientn","na.value","text","grey50",TRUE,"",NA 333 | "scale_fill_gradientn","na.value","text","grey50",TRUE,"",NA 334 | "scale_colour_gradient","guide","select","colourbar,legend",TRUE,"",NA 335 | "scale_fill_gradient","guide","select","colourbar,legend",TRUE,"",NA 336 | "scale_colour_gradient2","guide","select","colourbar,legend",TRUE,"",NA 337 | "scale_fill_gradient2","guide","select","colourbar,legend",TRUE,"",NA 338 | "scale_colour_gradientn","guide","select","colourbar,legend",TRUE,"",NA 339 | "scale_fill_gradientn","guide","select","colourbar,legend",TRUE,"",NA 340 | "scale_colour_gradient2","low","text","muted('red')",TRUE,"",NA 341 | "scale_fill_gradient2","low","text","muted('red')",TRUE,"",NA 342 | "scale_colour_gradient2","mid","text","white",TRUE,"",NA 343 | "scale_fill_gradient2","mid","text","white",TRUE,"",NA 344 | "scale_colour_gradient2","high","text","muted('blue')",TRUE,"",NA 345 | "scale_fill_gradient2","high","text","muted('blue')",TRUE,"",NA 346 | "scale_colour_gradientn","colours","text","",FALSE,"",NA 347 | "scale_fill_gradientn","colours","text","",FALSE,"",NA 348 | "scale_colour_gradient2","midpoint","text","0",FALSE,"",NA 349 | "scale_fill_gradient2","midpoint","text","0",FALSE,"",NA 350 | "scale_shape","solid","checkbox","TRUE",FALSE,"",NA 351 | "scale_shape_continuous","solid","checkbox","TRUE",FALSE,"",NA 352 | "scale_shape_discrete","solid","checkbox","TRUE",FALSE,"",NA 353 | "scale_colour_identity","guide","text","none",TRUE,"",NA 354 | "scale_fill_identity","guide","text","none",TRUE,"",NA 355 | "scale_shape_identity","guide","text","none",TRUE,"",NA 356 | "scale_linetype_identity","guide","text","none",TRUE,"",NA 357 | "scale_alpha_identity","guide","text","none",TRUE,"",NA 358 | "scale_size_identity","guide","text","none",TRUE,"",NA 359 | "scale_colour_manual","values","text","",FALSE,"",NA 360 | "scale_fill_manual","values","text","",FALSE,"",NA 361 | "scale_size_manual","values","text","",FALSE,"",NA 362 | "scale_shape_manual","values","text","",FALSE,"",NA 363 | "scale_linetype_manual","values","text","",FALSE,"",NA 364 | "scale_alpha_manual","values","text","",FALSE,"",NA 365 | "scale_radius","name","text","",FALSE,"waiver()",NA 366 | "scale_size","name","text","",FALSE,"waiver()",NA 367 | "scale_radius","breaks","text","",FALSE,"waiver()",NA 368 | "scale_size","breaks","text","",FALSE,"waiver()",NA 369 | "scale_radius","labels","text","",FALSE,"waiver()",NA 370 | "scale_size","labels","text","",FALSE,"waiver()",NA 371 | "scale_radius","limits","text","",FALSE,"NULL",NA 372 | "scale_size","limits","text","",FALSE,"NULL",NA 373 | "scale_radius","range","text","c(1,6)",FALSE,"",NA 374 | "scale_size","range","text","c(1,6)",FALSE,"",NA 375 | "scale_radius","guide","text","legend",TRUE,"",NA 376 | "scale_size","guide","text","legend",TRUE,"",NA 377 | "scale_size_area","max_size","text","6",FALSE,"",NA 378 | "scale_colour_continuous","type","select","gradient,viridis",TRUE,"",NA 379 | "scale_fill_continuous","type","select","gradient,viridis",TRUE,"",NA 380 | "scale_alpha","range","text","c(0.1,1)",FALSE,"",NA 381 | "scale_alpha_continuous","range","text","c(0.1,1)",FALSE,"",NA 382 | "scale_alpha_ordinal","range","text","c(0.1,1)",FALSE,"",NA 383 | "scale_colour_hue","h","text","c(0,360)+15",FALSE,"",NA 384 | "scale_fill_hue","h","text","c(0,360)+15",FALSE,"",NA 385 | "scale_colour_hue","c","text","100",FALSE,"",NA 386 | "scale_fill_hue","c","text","100",FALSE,"",NA 387 | "scale_colour_hue","l","text","65",FALSE,"",NA 388 | "scale_fill_hue","l","text","65",FALSE,"",NA 389 | "scale_colour_hue","h.start","text","0",FALSE,"",NA 390 | "scale_fill_hue","h.start","text","0",FALSE,"",NA 391 | "scale_colour_hue","direction","select","1,-1",TRUE,"",NA 392 | "scale_fill_hue","direction","select","1,-1",TRUE,"",NA 393 | "scale_colour_hue","na.value","text","grey50",TRUE,"",NA 394 | "scale_fill_hue","na.value","text","grey50",TRUE,"",NA 395 | "scale_x_date","name","text","",FALSE,"waiver()",NA 396 | "scale_y_date","name","text","",FALSE,"waiver()",NA 397 | "scale_x_datetime","name","text","",FALSE,"waiver()",NA 398 | "scale_y_datetime","name","text","",FALSE,"waiver()",NA 399 | "scale_x_time","name","text","",FALSE,"waiver()",NA 400 | "scale_y_time","name","text","",FALSE,"waiver()",NA 401 | "scale_x_date","breaks","text","",FALSE,"waiver()",NA 402 | "scale_y_date","breaks","text","",FALSE,"waiver()",NA 403 | "scale_x_datetime","breaks","text","",FALSE,"waiver()",NA 404 | "scale_y_datetime","breaks","text","",FALSE,"waiver()",NA 405 | "scale_x_time","breaks","text","",FALSE,"waiver()",NA 406 | "scale_y_time","breaks","text","",FALSE,"waiver()",NA 407 | "scale_x_date","minor_breaks","text","",FALSE,"waiver()",NA 408 | "scale_y_date","minor_breaks","text","",FALSE,"waiver()",NA 409 | "scale_x_datetime","minor_breaks","text","",FALSE,"waiver()",NA 410 | "scale_y_datetime","minor_breaks","text","",FALSE,"waiver()",NA 411 | "scale_x_time","minor_breaks","text","",FALSE,"waiver()",NA 412 | "scale_y_time","minor_breaks","text","",FALSE,"waiver()",NA 413 | "scale_x_date","labels","text","",FALSE,"waiver()",NA 414 | "scale_y_date","labels","text","",FALSE,"waiver()",NA 415 | "scale_x_datetime","labels","text","",FALSE,"waiver()",NA 416 | "scale_y_datetime","labels","text","",FALSE,"waiver()",NA 417 | "scale_x_time","labels","text","",FALSE,"waiver()",NA 418 | "scale_y_time","labels","text","",FALSE,"waiver()",NA 419 | "scale_x_date","expand","text","",FALSE,"waiver()",NA 420 | "scale_y_date","expand","text","",FALSE,"waiver()",NA 421 | "scale_x_datetime","expand","text","",FALSE,"waiver()",NA 422 | "scale_y_datetime","expand","text","",FALSE,"waiver()",NA 423 | "scale_x_time","expand","text","",FALSE,"waiver()",NA 424 | "scale_y_time","expand","text","",FALSE,"waiver()",NA 425 | "scale_x_date","date_breaks","text","",FALSE,"waiver()",NA 426 | "scale_y_date","date_breaks","text","",FALSE,"waiver()",NA 427 | "scale_x_datetime","date_breaks","text","",FALSE,"waiver()",NA 428 | "scale_y_datetime","date_breaks","text","",FALSE,"waiver()",NA 429 | "scale_x_date","date_labels","text","",FALSE,"waiver()",NA 430 | "scale_y_date","date_labels","text","",FALSE,"waiver()",NA 431 | "scale_x_datetime","date_labels","text","",FALSE,"waiver()",NA 432 | "scale_y_datetime","date_labels","text","",FALSE,"waiver()",NA 433 | "scale_x_date","date_minor_breaks","text","",FALSE,"waiver()",NA 434 | "scale_y_date","date_minor_breaks","text","",FALSE,"waiver()",NA 435 | "scale_x_datetime","date_minor_breaks","text","",FALSE,"waiver()",NA 436 | "scale_y_datetime","date_minor_breaks","text","",FALSE,"waiver()",NA 437 | "scale_x_date","limits","text","",FALSE,"NULL",NA 438 | "scale_y_date","limits","text","",FALSE,"NULL",NA 439 | "scale_x_datetime","limits","text","",FALSE,"NULL",NA 440 | "scale_y_datetime","limits","text","",FALSE,"NULL",NA 441 | "scale_x_time","limits","text","",FALSE,"NULL",NA 442 | "scale_y_time","limits","text","",FALSE,"NULL",NA 443 | "scale_x_date","position","select","bottom,top",TRUE,"",NA 444 | "scale_x_datetime","position","select","bottom,top",TRUE,"",NA 445 | "scale_x_time","position","select","bottom,top",TRUE,"",NA 446 | "scale_y_date","position","select","left,right",TRUE,"",NA 447 | "scale_y_datetime","position","select","left,right",TRUE,"",NA 448 | "scale_y_time","position","select","left,right",TRUE,"",NA 449 | "scale_x_datetime","timezone","text","",FALSE,"NULL",NA 450 | "scale_y_datetime","timezone","text","",FALSE,"NULL",NA 451 | "scale_x_time","oob","text","censor",FALSE,"",NA 452 | "scale_y_time","oob","text","censor",FALSE,"",NA 453 | "scale_x_time","na.value","text","NA_real_",FALSE,"",NA 454 | "scale_y_time","na.value","text","NA_real_",FALSE,"",NA 455 | "margin","t","text","0",FALSE,"",NA 456 | "margin","r","text","0",FALSE,"",NA 457 | "margin","b","text","0",FALSE,"",NA 458 | "margin","l","text","0",FALSE,"",NA 459 | "margin","unit","select","pt,line,npc,cm,inches,mm,picas,bigpts,dida,cicero,scaledpts,lines,char,native,snpc,strwidth,strheight,grobwidth,grobheight",TRUE,"",NA 460 | "element_rect","fill","select","NULL",TRUE,"",NA 461 | "element_text","family","select","NULL,mono,sans,serif,Courier,Helvetica,Times",TRUE,"",NA 462 | "element_text","face","select","NULL,plain,italic,bold,bold.italic",TRUE,"",NA 463 | "element_rect","colour","select","NULL",TRUE,"",NA 464 | "element_line","colour","select","NULL",TRUE,"",NA 465 | "element_text","colour","select","NULL",TRUE,"",NA 466 | "element_rect","size","text","",FALSE,"NULL",NA 467 | "element_line","size","text","",FALSE,"NULL",NA 468 | "element_text","size","text","",FALSE,"NULL",NA 469 | "element_rect","linetype","select","NULL,blank,solid,dashed,dotted,dotdash,longdash,twodash",TRUE,"",NA 470 | "element_line","linetype","select","NULL,blank,solid,dashed,dotted,dotdash,longdash,twodash",TRUE,"",NA 471 | "element_line","arrow","text","",FALSE,"arrow()",NA 472 | "element_text","hjust","text","",FALSE,"NULL",NA 473 | "element_text","vjust","text","",FALSE,"NULL",NA 474 | "element_text","angle","text","",FALSE,"NULL",NA 475 | "element_text","lineheight","text","",FALSE,"NULL",NA 476 | "element_text","margin","text","",FALSE,"margin()",NA 477 | "element_text","debug","checkbox","FALSE",FALSE,"",NA 478 | "arrow","angle","text","30",FALSE,"",NA 479 | "arrow","length","text","unit(0.25,""inches"")",FALSE,"unit(0.25,""inches"")",NA 480 | "arrow","ends","select","last, first,both",TRUE,"",NA 481 | "arrow","type","select","open,closed",TRUE,"",NA 482 | "theme_grey","base_size","text","11",FALSE,"",NA 483 | "theme_gray","base_size","text","11",FALSE,"",NA 484 | "theme_bw","base_size","text","11",FALSE,"",NA 485 | "theme_linedraw","base_size","text","11",FALSE,"",NA 486 | "theme_light","base_size","text","11",FALSE,"",NA 487 | "theme_dark","base_size","text","11",FALSE,"",NA 488 | "theme_minimal","base_size","text","11",FALSE,"",NA 489 | "theme_classic","base_size","text","11",FALSE,"",NA 490 | "theme_void","base_size","text","11",FALSE,"",NA 491 | "theme_test","base_size","text","11",FALSE,"",NA 492 | "theme_stata","base_size","text","11",FALSE,"",NA 493 | "theme_tufte","base_size","text","11",FALSE,"",NA 494 | "theme_grey","base_family","select",",mono,sans,serif,Courier,Helvetica,Times",TRUE,"",NA 495 | "theme_gray","base_family","select",",mono,sans,serif,Courier,Helvetica,Times",TRUE,"",NA 496 | "theme_bw","base_family","select",",mono,sans,serif,Courier,Helvetica,Times",TRUE,"",NA 497 | "theme_linedraw","base_family","select",",mono,sans,serif,Courier,Helvetica,Times",TRUE,"",NA 498 | "theme_light","base_family","select",",mono,sans,serif,Courier,Helvetica,Times",TRUE,"",NA 499 | "theme_dark","base_family","select",",mono,sans,serif,Courier,Helvetica,Times",TRUE,"",NA 500 | "theme_minimal","base_family","select",",mono,sans,serif,Courier,Helvetica,Times",TRUE,"",NA 501 | "theme_classic","base_family","select",",mono,sans,serif,Courier,Helvetica,Times",TRUE,"",NA 502 | "theme_void","base_family","select",",mono,sans,serif,Courier,Helvetica,Times",TRUE,"",NA 503 | "theme_test","base_family","select",",mono,sans,serif,Courier,Helvetica,Times",TRUE,"",NA 504 | "theme_grey","base_line_size","text","base_size/22",FALSE,"",NA 505 | "theme_gray","base_line_size","text","base_size/22",FALSE,"",NA 506 | "theme_bw","base_line_size","text","base_size/22",FALSE,"",NA 507 | "theme_linedraw","base_line_size","text","base_size/22",FALSE,"",NA 508 | "theme_light","base_line_size","text","base_size/22",FALSE,"",NA 509 | "theme_dark","base_line_size","text","base_size/22",FALSE,"",NA 510 | "theme_minimal","base_line_size","text","base_size/22",FALSE,"",NA 511 | "theme_classic","base_line_size","text","base_size/22",FALSE,"",NA 512 | "theme_void","base_line_size","text","base_size/22",FALSE,"",NA 513 | "theme_test","base_line_size","text","base_size/22",FALSE,"",NA 514 | "theme_grey","base_rect_size","text","base_size/22",FALSE,"",NA 515 | "theme_gray","base_rect_size","text","base_size/22",FALSE,"",NA 516 | "theme_bw","base_rect_size","text","base_size/22",FALSE,"",NA 517 | "theme_linedraw","base_rect_size","text","base_size/22",FALSE,"",NA 518 | "theme_light","base_rect_size","text","base_size/22",FALSE,"",NA 519 | "theme_dark","base_rect_size","text","base_size/22",FALSE,"",NA 520 | "theme_minimal","base_rect_size","text","base_size/22",FALSE,"",NA 521 | "theme_classic","base_rect_size","text","base_size/22",FALSE,"",NA 522 | "theme_void","base_rect_size","text","base_size/22",FALSE,"",NA 523 | "theme_test","base_rect_size","text","base_size/22",FALSE,"",NA 524 | "theme_wsj","base_size","text","12",FALSE,"",NA 525 | "theme_excel","base_size","text","12",FALSE,"",NA 526 | "theme_fivethirtyeight","base_size","text","12",FALSE,"",NA 527 | "theme_wsj","color","text","brown",TRUE,"",NA 528 | "theme_wsj","base_family","text","sans",TRUE,"",NA 529 | "theme_economist","base_family","text","sans",TRUE,"",NA 530 | "theme_economist_white","base_family","text","sans",TRUE,"",NA 531 | "theme_fivethirtyeight","base_family","text","sans",TRUE,"",NA 532 | "theme_stata","base_family","text","sans",TRUE,"",NA 533 | "theme_wsj","title_family","text","mono",TRUE,"",NA 534 | "theme_economist","base_size","text","10",FALSE,"",NA 535 | "theme_economist","horizontal","checkbox","TRUE",FALSE,"",NA 536 | "theme_economist_white","horizontal","checkbox","TRUE",FALSE,"",NA 537 | "theme_excel","horizontal","checkbox","TRUE",FALSE,"",NA 538 | "theme_economist","dkpanel","checkbox","FALSE",FALSE,"",NA 539 | "theme_economist","stata","checkbox","FALSE",FALSE,"",NA 540 | "theme_economist_white","gray_bg","checkbox","FALSE",FALSE,"",NA 541 | "theme_excel","base_family","text","",TRUE,"",NA 542 | "theme_stata","scheme","select","S2color,s2mono,s1color,s1rcolor,s1mono,s2manual,s1manual,sj",TRUE,"",NA 543 | "theme_tufte","base_family","text","serif",TRUE,"",NA 544 | "theme_tufte","ticks","checkbox","TRUE",FALSE,"",NA 545 | "element_line","lineend","select","NULL,round,butt,square",TRUE,"",NA 546 | "unit","x","text","",FALSE,"",NA 547 | "unit","units","select","line,npc,cm,inches,mm,points,picas,bigpts,dida,cicero,scaledpts,lines,char,native,snpc,strwidth,strheight,grobwidth,grobheight",TRUE,"",NA 548 | "coord_fixed","ratio","text","1",FALSE,"aspect ratio, expressed as y / x",NA 549 | "coord_cartesian","xlim","text","",FALSE,"Limits for the x and y axes",NA 550 | "coord_fixed","xlim","text","",FALSE,"Limits for the x and y axes",NA 551 | "coord_flip","xlim","text","",FALSE,"Limits for the x and y axes",NA 552 | "coord_map","xlim","text","",FALSE,"Limits for the x and y axes",NA 553 | "coord_quickmap","xlim","text","",FALSE,"Limits for the x and y axes",NA 554 | "coord_sf","xlim","text","",FALSE,"Limits for the x and y axes",NA 555 | "coord_cartesian","ylim","text","",FALSE,"Limits for the x and y axes",NA 556 | "coord_fixed","ylim","text","",FALSE,"Limits for the x and y axes",NA 557 | "coord_flip","ylim","text","",FALSE,"Limits for the x and y axes",NA 558 | "coord_map","ylim","text","",FALSE,"Limits for the x and y axes",NA 559 | "coord_quickmap","ylim","text","",FALSE,"Limits for the x and y axes",NA 560 | "coord_sf","ylim","text","",FALSE,"Limits for the x and y axes",NA 561 | "coord_cartesian","expand","checkbox","TRUE",FALSE,"If TRUE, the default, adds a small expansion factor to the limits to ensure that data and axes don't overlap. If FALSE, limits are taken exactly from the data or xlim/ylim.",NA 562 | "coord_sf","expand","checkbox","TRUE",FALSE,"If TRUE, the default, adds a small expansion factor to the limits to ensure that data and axes don't overlap. If FALSE, limits are taken exactly from the data or xlim/ylim.",NA 563 | "coord_fixed","expand","checkbox","TRUE",FALSE,"If TRUE, the default, adds a small expansion factor to the limits to ensure that data and axes don't overlap. If FALSE, limits are taken exactly from the data or xlim/ylim.",NA 564 | "coord_flip","expand","checkbox","TRUE",FALSE,"If TRUE, the default, adds a small expansion factor to the limits to ensure that data and axes don't overlap. If FALSE, limits are taken exactly from the data or xlim/ylim.",NA 565 | "coord_quickmap","expand","checkbox","TRUE",FALSE,"If TRUE, the default, adds a small expansion factor to the limits to ensure that data and axes don't overlap. If FALSE, limits are taken exactly from the data or xlim/ylim.",NA 566 | "coord_map","projection","select","mercator,sinusoidal,cylequalarea,cylindrical,rectangular,gall,mollweide,gilbert,azequidistant,azequalarea,gnomonic,perspectuve,orthographic,stereographic,laue,fisheye,newyorker,conic,simpleconic,guyou,squae,tetra,hex,harrison,trapezoidal,lune",TRUE,NA,NA 567 | "coord_map","parameters","text","",FALSE,"unnamed parameters passed on mapproj::mapproject()",NA 568 | "coord_map","orientation","text","",FALSE,"projection orientation, which defaults to c(90, 0, mean(range(x)))",NA 569 | "coord_polar","theta","select","x,y",TRUE,"variable to map angle to (x or y)",NA 570 | "coord_polar","start","text","0",FALSE,"offset of starting point from 12 o'clock in radians",NA 571 | "coord_polar","direction","text","1",FALSE,"1, clockwise; -1, anticlockwise",NA 572 | "coord_sf","crs","text","",FALSE,"Use this to select a specific CRS. If not specified, will use the CRS defined in the first layer",NA 573 | "coord_sf","datum","text","sf::st_crs(4326)",FALSE,"CRS that provides datum to use when generating graticules",NA 574 | "coord_sf","ndiscr","text","100",FALSE,"number of segments to use for discretizing graticule lines; try increasing this when graticules look unexpected",NA 575 | "coord_trans","x","select","identity,log10,sqrt",TRUE,"",NA 576 | "coord_trans","y","select","identity,log10,sqrt",TRUE,"",NA 577 | "coord_trans","limx","text","",FALSE,"limits for x and y axes.",NA 578 | "coord_trans","limy","text","",FALSE,"limits for x and y axes.",NA 579 | "xlab","label","text","",TRUE,"The text for the x-axis label",NA 580 | "ylab","label","text","",TRUE,"The text for the y-axis label",NA 581 | "ggtitle","label","text","",TRUE,"The text for the plot title",NA 582 | "ggtitle","subtitle","text","",TRUE,"A text for subtitle",NA 583 | "labs","title","text","",TRUE,"The text for the plot title",NA 584 | "labs","subtitle","text","",TRUE,"The text for the plot subtitle",NA 585 | "labs","caption","text","",TRUE,"The text for the plot caption",NA 586 | "annotate","geom","select","text,rect,segment,pointrange",TRUE,"name of geom to use for annotation",NA 587 | "annotate","x","text","",FALSE,"positioning aesthetics ",NA 588 | "annotate","y","text","",FALSE,"positioning aesthetics ",NA 589 | "annotate","xmn","text","",FALSE,"positioning aesthetics ",NA 590 | "annotate","ymin","text","",FALSE,"positioning aesthetics ",NA 591 | "annotate","xmax","text","",FALSE,"positioning aesthetics ",NA 592 | "annotate","ymax","text","",FALSE,"positioning aesthetics ",NA 593 | "annotate","xend","text","",FALSE,"positioning aesthetics ",NA 594 | "annotate","yend","text","",FALSE,"positioning aesthetics ",NA 595 | "annotation_custom","grob","text","",FALSE,"grob to display",NA 596 | "annotation_custom","xmin","text","-Inf",FALSE,"x location ",NA 597 | "annotation_custom","ymin","text","-Inf",FALSE,"x location ",NA 598 | "annotation_custom","xmax","text","Inf",FALSE,"y location",NA 599 | "annotation_custom","ymax","text","Inf",FALSE,"y location",NA 600 | "annotation_logticks","base","text","10",FALSE,"the base of the log (default 10)",NA 601 | "annotation_logticks","side","text","bl",TRUE,"string containing any of ""trbl"", for top, right, bottom, and left",NA 602 | "annotation_logticks","scaled","checkbox","TRUE",FALSE,"s the data already log-scaled?",NA 603 | "annotation_logticks","short","text","unit(0.1, ""cm"")",FALSE,"unit(0.1, ""cm"")",NA 604 | "annotation_logticks","mid","text","unit(0.2,""cm"")",FALSE,"unit(0.2,""cm"")",NA 605 | "annotation_logticks","long","text","unit(0.3,""cm"")",FALSE,"unit(0.3,""cm"")",NA 606 | "annotation_logticks","colour","select","black",TRUE,"",NA 607 | "annotation_logticks","size","text","0.5",FALSE,"",NA 608 | "annotation_logticks","linetype","select","solid,blank,dashed,dotted,dotdash,longdash,twodash",TRUE,"",NA 609 | "annotation_logticks","alpha","text","1",FALSE,"",NA 610 | "annotation_map","map","text","",FALSE,"data frame representing a map",NA 611 | "annotation_raster","raster","text","",FALSE,"raster object to display",NA 612 | "annotation_raster","xmin","text","",FALSE,"x, y location (in data coordinate)",NA 613 | "annotation_raster","xmax","text","",FALSE,"x, y location (in data coordinate)",NA 614 | "annotation_raster","ymin","text","",FALSE,"x, y location (in data coordinate)",NA 615 | "annotation_raster","ymax","text","",FALSE,"x, y location (in data coordinate)",NA 616 | "annotation_raster","interpolate","checkbox","FALSE",FALSE,"If TRUE interpolate linearly, if FALSE (the default) don't interpolate",NA 617 | "borders","database","select","world,usa,state,county",TRUE,NA,NA 618 | "borders","region","text",".",TRUE,"map region",NA 619 | "borders","fill","select","NA,",TRUE,"",NA 620 | "borders","colour","select","grey50,",TRUE,"",NA 621 | "borders","xlim","text","",FALSE,"NULL",NA 622 | "borders","ylim","text","",FALSE,"NULL",NA 623 | "xlim","min","text","",FALSE,"",NA 624 | "ylim","min","text","",FALSE,"",NA 625 | "xlim","max","text","",FALSE,"",NA 626 | "ylim","max","text","",FALSE,"",NA 627 | "facet_grid","shrink","checkbox","TRUE",FALSE,NA,NA 628 | "facet_wrap","shrink","checkbox","TRUE",FALSE,NA,NA 629 | "facet_grid","as.table","checkbox","TRUE",FALSE,"",NA 630 | "facet_wrap","as.table","checkbox","TRUE",FALSE,"",NA 631 | "facet_wrap","drop","checkbox","TRUE",FALSE,NA,NA 632 | "facet_grid","drop","checkbox","TRUE",FALSE,NA,NA 633 | "facet_grid","switch","select","NULL,x,y",TRUE,"By default, the labels are displayed on the top and right of the plot",NA 634 | "facet_wrap","switch","select","NULL,x,y",TRUE,"By default, the labels are displayed on the top and right of the plot",NA 635 | "facet_wrap","dir","select","h,v",TRUE,"",NA 636 | "facet_wrap","strip.position","select","top,bottom,left,right",TRUE,NA,NA 637 | "facet_grid","labeller","select","label_value,label_both,label_context,label_parsed,label_wrap_gen(),label_bquote()",FALSE,"",NA 638 | "theme","line","select","element_line(),element_blank()",FALSE,NA,NA 639 | "theme","line","select","element_line(),element_blank()",FALSE,NA,NA 640 | "label_value","labels","text","",FALSE,"Data frame of labels. ",NA 641 | "label_both","labels","text","",FALSE,"Data frame of labels. ",NA 642 | "label_context","labels","text","",FALSE,"Data frame of labels. ",NA 643 | "label_parsed","labels","text","",FALSE,"Data frame of labels. ",NA 644 | "label_wrap_gen","width","text","25",FALSE,"Maximum number of characters before wrapping the strip.",NA 645 | "label_value","multi_line","checkbox","TRUE",FALSE,"Whether to display the labels of multiple factors on separate lines",NA 646 | "label_both","multi_line","checkbox","TRUE",FALSE,"Whether to display the labels of multiple factors on separate lines",NA 647 | "label_context","multi_line","checkbox","TRUE",FALSE,"Whether to display the labels of multiple factors on separate lines",NA 648 | "label_parsed","multi_line","checkbox","TRUE",FALSE,"Whether to display the labels of multiple factors on separate lines",NA 649 | "label_wrap_gen","multi_line","checkbox","TRUE",FALSE,"Whether to display the labels of multiple factors on separate lines",NA 650 | "label_both","sep","text",": ",TRUE,"String separating variables and values.",NA 651 | "label_context","sep","text",": ",TRUE,"String separating variables and values.",NA 652 | "position_dodge","width","text","",FALSE,"Dodging width, when different to the width of the individual elements. ",NA 653 | "position_dodge2","width","text","",FALSE,"Dodging width, when different to the width of the individual elements. ",NA 654 | "position_dodge","preserve","select","total,single",TRUE,"",NA 655 | "position_dodge","padding","text","0.1",FALSE,"Padding between elements at the same position. ",NA 656 | "position_dodge2","reverse","checkbox","FALSE",FALSE,"If TRUE, will reverse the default stacking order. This is useful if you're rotating both the plot and legend.",NA 657 | "position_stack","vjust","text","1",FALSE,"Vertical adjustment for geoms that have a position (like points or lines), not a dimension (like bars or areas). 0-1",NA 658 | "position_fill","vjust","text","1",FALSE,"Vertical adjustment for geoms that have a position (like points or lines), not a dimension (like bars or areas). 0-1",NA 659 | "position_stack","reverse","checkbox","FALSE",FALSE,"if TRUE, will reverse the default stacking order. This is useful if you're rotating both the plot and legend.",NA 660 | "position_fill","reverse","checkbox","FALSE",FALSE,"if TRUE, will reverse the default stacking order. This is useful if you're rotating both the plot and legend.",NA 661 | "position_jitter","width","text","NULL",FALSE,"Amount of horizontal jitter.",NA 662 | "position_jitter","height","text","NULL",FALSE,"Amount of vertical jitter.",NA 663 | "position_jitter","seed","text","",FALSE,"A random seed to make the jitter reproducible.",NA 664 | "position_jitterdodge","jitter.width","text","NULL",FALSE,"degree of jitter in x direction. Defaults to 40% of the resolution of the data.",NA 665 | "position_jitterdodge","jitter.height","text","0",FALSE,"degree of jitter in y direction. Defaults to 0.",NA 666 | "position_jitterdodge","dodge.width","text","0.75",FALSE,"the amount to dodge in the x direction. Defaults to 0.75, the default position_dodge() width.",NA 667 | "position_nudge","x","text","0",FALSE,"Amount of vertical and horizontal distance to move. 668 | ",NA 669 | "position_nudge","y","text","0",FALSE,"Amount of vertical and horizontal distance to move. 670 | ",NA 671 | "position_dodge2","preserve","select","single,total",TRUE,"",NA 672 | "label_bquote","rows","text","",FALSE,"NULL",NA 673 | "label_bquote","cols","text","",FALSE,"NULL",NA 674 | "label_bquote","default","text","label_value",FALSE,"",NA 675 | "geom_text","vjust","text","",FALSE,"",NA 676 | "geom_label","vjust","text","",FALSE,"",NA 677 | "geom_text","hjust","text","",FALSE,"",NA 678 | "geom_label","hjust","text","",FALSE,"",NA 679 | "line","line","select","element_line(),element_blank()",FALSE,"","all" 680 | "rect","rect","select","element_rect(),element_blank()",FALSE,"","all" 681 | "text","text","select","element_text(),element_blank()",FALSE,"","all" 682 | "title","title","select","element_text(),element_blank()",FALSE,"","all" 683 | "aspect.ratio","aspect.ratio","text","",FALSE,"","all" 684 | "axis.title","axis.title","select","element_text(),element_blank()",FALSE,"","axis" 685 | "axis.title.x","axis.title.x","select","element_text(),element_blank()",FALSE,"","axis" 686 | "axis.title.x.top","axis.title.x.top","select","element_text(),element_blank()",FALSE,"","axis" 687 | "axis.title.x.bottom","axis.title.x.bottom","select","element_text(),element_blank()",FALSE,"","axis" 688 | "axis.title.y","axis.title.y","select","element_text(),element_blank()",FALSE,"","axis" 689 | "axis.title.y.left","axis.title.y.left","select","element_text(),element_blank()",FALSE,"","axis" 690 | "axis.title.y.right","axis.title.y.right","select","element_text(),element_blank()",FALSE,"","axis" 691 | "axis.text","axis.text","select","element_text(),element_blank()",FALSE,"","axis" 692 | "axis.text.x","axis.text.x","select","element_text(),element_blank()",FALSE,"","axis" 693 | "axis.text.x.top","axis.text.x.top","select","element_text(),element_blank()",FALSE,"","axis" 694 | "axis.text.x.bottom","axis.text.x.bottom","select","element_text(),element_blank()",FALSE,"","axis" 695 | "axis.text.y","axis.text.y","select","element_text(),element_blank()",FALSE,"","axis" 696 | "axis.text.y.left","axis.text.y.left","select","element_text(),element_blank()",FALSE,"","axis" 697 | "axis.text.y.right","axis.text.y.right","select","element_text(),element_blank()",FALSE,"","axis" 698 | "axis.ticks","axis.ticks","select","element_line(),element_blank()",FALSE,"","axis" 699 | "axis.ticks.x","axis.ticks.x","select","element_line(),element_blank()",FALSE,"","axis" 700 | "axis.ticks.x.top","axis.ticks.x.top","select","element_line(),element_blank()",FALSE,"","axis" 701 | "axis.ticks.x.bottom","axis.ticks.x.bottom","select","element_line(),element_blank()",FALSE,"","axis" 702 | "axis.ticks.y","axis.ticks.y","select","element_line(),element_blank()",FALSE,"","axis" 703 | "axis.ticks.y.left","axis.ticks.y.left","select","element_line(),element_blank()",FALSE,"","axis" 704 | "axis.ticks.y.right","axis.ticks.y.right","select","element_line(),element_blank()",FALSE,"","axis" 705 | "axis.ticks.length","axis.ticks.length","text","unit()",FALSE,"","axis" 706 | "axis.line","axis.line","select","element_line(),element_blank()",FALSE,"","axis" 707 | "axis.line.x","axis.line.x","select","element_line(),element_blank()",FALSE,"","axis" 708 | "axis.line.x.top","axis.line.x.top","select","element_line(),element_blank()",FALSE,"","axis" 709 | "axis.line.x.bottom","axis.line.x.bottom","select","element_line(),element_blank()",FALSE,"","axis" 710 | "axis.line.y","axis.line.y","select","element_line(),element_blank()",FALSE,"","axis" 711 | "axis.line.y.left","axis.line.y.left","select","element_line(),element_blank()",FALSE,"","axis" 712 | "axis.line.yright","axis.line.yright","select","element_line(),element_blank()",FALSE,"","axis" 713 | "legend.background","legend.background","select","element_rect(),element_blank()",FALSE,"","legend" 714 | "legend.margin","legend.margin","text","margin()",FALSE,"","legend" 715 | "legend.spacing","legend.spacing","text","unit()",FALSE,"","legend" 716 | "legend.spacing.x","legend.spacing.x","text","unit()",FALSE,"","legend" 717 | "legend.spacing.y","legend.spacing.y","text","unit()",FALSE,"","legend" 718 | "legend.key","legend.key","select","element_rect(),element_blank()",FALSE,"","legend" 719 | "legend.key.size","legend.key.size","text","unit()",FALSE,"","legend" 720 | "legend.key.height","legend.key.height","text","unit()",FALSE,"","legend" 721 | "legend.key.width","legend.key.width","text","unit()",FALSE,"","legend" 722 | "legend.text","legend.text","select","element_text(),element_blank()",FALSE,"","legend" 723 | "legend.text.align","legend.text.align","text","",FALSE,"alignment of legend labels (number from 0 (left) to 1 (right))","legend" 724 | "legend.title","legend.title","select","element_text(),element_blank()",FALSE,"","legend" 725 | "legend.title.align","legend.title.align","text","",FALSE,"alignment of legend title (number from 0 (left) to 1 (right))","legend" 726 | "legend.position","legend.position","select",",right,bottom,left,top,none",TRUE,"","legend" 727 | "legend.direction","legend.direction","select","horizontal,vertical",TRUE,"","legend" 728 | "legend.justification","legend.justification","text","",FALSE,"","legend" 729 | "legend.box","legend.box","select","horizontal,vertical",TRUE,"","legend" 730 | "legend.box.just","legend.box.just","select","top,bottom,left,right",TRUE,"","legend" 731 | "legend.box.margin","legend.box.margin","text","margin()",FALSE,"","legend" 732 | "legend.box.background","legend.box.background","select","element_rect(),element_blank()",FALSE,"","legend" 733 | "legend.box.spacing","legend.box.spacing","text","unit()",FALSE,"","legend" 734 | "panel.background","panel.background","select","element_rect(),element_blank()",FALSE,"","panel" 735 | "panel.spacing","panel.spacing","text","unit()",FALSE,"","panel" 736 | "panel.spacing.x","panel.spacing.x","text","unit()",FALSE,"","panel" 737 | "panel.spacing.y","panel.spacing.y","text","unit()",FALSE,"","panel" 738 | "panel.grid","panel.grid","select","element_line(),element_blank()",FALSE,"","panel" 739 | "panel.grid.major","panel.grid.major","select","element_line(),element_blank()",FALSE,"","panel" 740 | "panel.grid.minor","panel.grid.minor","select","element_line(),element_blank()",FALSE,"","panel" 741 | "panel.grid.major.x","panel.grid.major.x","select","element_line(),element_blank()",FALSE,"","panel" 742 | "panel.grid.major.y","panel.grid.major.y","select","element_line(),element_blank()",FALSE,"","panel" 743 | "panel.grid.minor.x","panel.grid.minor.x","select","element_line(),element_blank()",FALSE,"","panel" 744 | "panel.grid.minor.y","panel.grid.minor.y","select","element_line(),element_blank()",FALSE,"","panel" 745 | "panel.ontop","panel.ontop","checkbox","TRUE",FALSE,"","panel" 746 | "plot.background","plot.background","select","element_rect(),element_blank()",FALSE,"","plot" 747 | "plot.title","plot.title","select","element_text(),element_blank()",FALSE,"","plot" 748 | "plot.subtitle","plot.subtitle","select","element_text(),element_blank()",FALSE,"","plot" 749 | "plot.caption","plot.caption","select","element_text(),element_blank()",FALSE,"","plot" 750 | "plot.margin","plot.margin","text","margin()",FALSE,"","plot" 751 | "strip.background","strip.background","select","element_rect(),element_blank()",FALSE,"","strip" 752 | "strip.placement","strip.placement","select","inside,outside",TRUE,"","strip" 753 | "strip.text","strip.text","select","element_text(),element_blank()",FALSE,"","strip" 754 | "strip.text.x","strip.text.x","select","element_text(),element_blank()",FALSE,"","strip" 755 | "strip.text.y","strip.text.y","select","element_text(),element_blank()",FALSE,"","strip" 756 | "strip.switch.pad.grid","strip.switch.pad.grid","text","unit()",FALSE,"","strip" 757 | "strip.switch.pad.wrap","strip.switch.pad.wrap","text","unit()",FALSE,"","strip" 758 | "complete","complete","checkbox","FALSE",FALSE,"","etc" 759 | "validate","validate","checkbox","TRUE",FALSE,"","etc" 760 | -------------------------------------------------------------------------------- /data-raw/default.csv: -------------------------------------------------------------------------------- 1 | "geom","var","default" 2 | "geom_point,geom_path,geom_line,geom_step,geom_ribbon,geom_area,geom_blank,geom_crossbar,geom_errorbar,geom_errorbarh,geom_linerange,geom_pointrange,geom_segment,geom_curve","stat","identity" 3 | "geom_point,geom_smooth,geom_path,geom_line,geom_step,geom_ribbon,geom_bin2d,stat_bin_2d,geom_blank,geom_contour,stat_contour,geom_count,stat_sum,geom_crossbar,geom_errorbar,geom_linerange,geom_pointrange,geom_segment,geom_curve,geom_density","position","identity" 4 | "geom_smooth","stat","smooth" 5 | "geom_area,geom_bar,geom_col,stat_count,stat_density,geom_histogram,stat_bin","position","stack" 6 | "geom_bar","stat","count" 7 | "stat_count,stat_bin","geom","bar" 8 | "stat_smooth","geom","smooth" 9 | "geom_text,geom_label","stat","identity" 10 | "geom_text,geom_label","position","identity" 11 | "geom_bin2d","stat","bin2d" 12 | "stat_bin_2d","geom","tile" 13 | "geom_boxplot","stat","boxplot" 14 | "stat_boxplot","geom","boxplot" 15 | "geom_boxplot,stat_boxplot,geom_violin,stat_ydensity","position","dodge" 16 | "geom_contour","stat","contour" 17 | "stat_contour","geom","contour" 18 | "geom_count","stat","sum" 19 | "stat_sum","geom","point" 20 | "geom_segment,geom_curve","lineend","butt" 21 | "geom_density","stat","density" 22 | "stat_density","geom","area" 23 | "geom_density2d,geom_density_2d","stat","density2d" 24 | "geom_density2d,geom_density_2d,stat_density_2d,geom_dotplot,geom_errorbarh,geom_freqpoly,geom_hex,stat_bin_hex,geom_quantile,stat_quantile","position","identity" 25 | "stat_density_2d","geom","density_2d" 26 | "geom_freqpoly,geom_histogram","stat","bin" 27 | "geom_hex","stat","binhex" 28 | "stat_bin_hex","geom","hex" 29 | "geom_jitter","position","jitter" 30 | "geom_jitter,geom_map,geom_raster,geom_rect,geom_tile,geom_rug,geom_spoke","stat","identity" 31 | "stat_qq,geom_qq","geom","point" 32 | "geom_quantile","stat","quantile" 33 | "stat_quantile","geom","quantile" 34 | "geom_raster,geom_rect,geom_tile,geom_rug,stat_smooth,geom_spoke","position","identity" 35 | "geom_violin","stat","ydensity" 36 | "stat_ydensity","geom","violin" 37 | -------------------------------------------------------------------------------- /data-raw/geom.csv: -------------------------------------------------------------------------------- 1 | "geom","aes","ex","ex2","code","layer","data" 2 | "coord_cartesian","","r","coord_cartesian(xlim=c(0,5))","ggplot(mpg,aes(fl))+geom_bar()","","mpg" 3 | "coord_fixed","","r","coord_fixed(ratio=1/2)","ggplot(mpg,aes(fl))+geom_bar()","","mpg" 4 | "coord_flip","","r","coord_flip()","ggplot(mpg,aes(fl))+geom_bar()","","mpg" 5 | "coord_map","","u","coord_map(projection=""ortho"",orientation=c(41,-74,0))","ggplot(map_data('world'), aes(long, lat, group = group))","geom_polygon(fill = 'white', colour = 'black')","map" 6 | "coord_polar","","r","coord_polar(theta=""x"",direction=1)","ggplot(mpg,aes(fl))+geom_bar()","","mpg" 7 | "coord_quickmap","","u","coord_quickmap()","ggplot(map_data('world'), aes(long, lat, group = group))","geom_polygon(fill = 'white', colour = 'black')","map" 8 | "coord_trans","","r","coord_trans(y=""sqrt"")","ggplot(mpg,aes(fl))+geom_bar()","","mpg" 9 | "facet_grid","","t","facet_grid(year~fl)","ggplot(mpg,aes(cty,hwy))","geom_point()","mpg" 10 | "facet_wrap","","t","facet_wrap(~fl)","ggplot(mpg,aes(cty,hwy))+geom_point()","","mpg" 11 | "geom_abline","intercept,slope,x,y,alpha,color,size,linetype","b","geom_abline(aes(intercept=1,slope=1))","ggplot(seals,aes(x=long,y=lat))","","seals" 12 | "geom_area","x,y,alpha,color,fill,size,linetype","c","geom_area(stat=""bin"")","ggplot(mpg,aes(hwy))","","mpg" 13 | "geom_bar","x,alpha,color,fill,size,linetype,weight","d","geom_bar()","ggplot(mpg,aes(fl))","","mpg" 14 | "geom_bin2d","x,y,alpha,color,fill,linetype,size,weight","h","geom_bin2d(binwidth=c(0.25,500))","ggplot(diamonds,aes(carat,price))","","diamonds" 15 | "geom_boxplot","x,y,lower,middle,upper,ymax,ymin,alpha,color,fill,group,linetype,shape,size,weight","f","geom_boxplot()","ggplot(mpg,aes(class,hwy))","","mpg" 16 | "geom_col","x,y,alpha,color,fill,group,linetype,size,","f","geom_col()","ggplot(mpg,aes(class,hwy))","","mpg" 17 | "geom_contour","x,y,z,alpha,color,group,linetype,size,weight","l","geom_contour(aes(z=z))","ggplot(seals,aes(long,lat))","","seals" 18 | "geom_count","x,y,alpha,color,fill,shape,size,stroke","g","geom_count()","ggplot(diamonds,aes(cut,color))","","diamonds" 19 | "geom_crossbar","x,y,ymax,ymin,alpha,color,fill,group,linetype,size","j","geom_crossbar(fatten=2)","ggplot(dfj,aes(grp,fit,ymin=fit-se,ymax=fit+se))","","dfj" 20 | "geom_curve","x,xend,y,yend,alpha,angle,color,curvature,linetype,size","b","geom_curve(aes(yend=lat+1,exend=long+2,curvarture=z))","ggplot(seals,aes(x=long,y=lat))","","seals" 21 | "geom_density","x,y,alpha,color,fill,group,size,linetype,weight","c","geom_density(kernel=""gaussian"")","ggplot(mpg,aes(hwy))","","mpg" 22 | "geom_density2d","x,y,alpha,color,group,linetype,size","h","geom_density2d()","ggplot(diamonds,aes(carat,price))","","diamonds" 23 | "geom_dotplot","x,y,alpha,color,fill","c","geom_dotplot()","ggplot(mpg,aes(hwy))","","mpg" 24 | "geom_errorbar","x,ymax,ymin,alpha,color,group,linetype,size,width","j","geom_errorbar()","ggplot(dfj,aes(grp,fit,ymin=fit-se,ymax=fit+se))","","dfj" 25 | "geom_errorbarh","x,xmin,xmax,y,alpha,color,group,linetype,size,height","j","geom_linerange()","ggplot(dfj,aes(grp,fit,ymin=fit-se,ymax=fit+se))","","dfj" 26 | "geom_freqpoly","x,y,alpha,color,group,size,linetype","c","geom_freqpoly()","ggplot(mpg,aes(hwy))","","mpg" 27 | "geom_hex","x,y,alpha,color,fill,size","h","geom_hex()","ggplot(diamonds,aes(carat,price))","","diamonds" 28 | "geom_histogram","x,y,alpha,color,group,size,linetype,weight","c","geom_histogram(binwidth=6)","ggplot(mpg,aes(hwy))","","mpg" 29 | "geom_hline","yintercept,x,y,alpha,color,size,linetype","b","geom_hline(aes(yintercept=lat))","ggplot(seals,aes(x=long,y=lat))","","seals" 30 | "geom_jitter","x,y,alpha,color,fill,shape,size","e","geom_jitter(height=2,width=2)","ggplot(mpg,aes(cty,hwy))","","mpg" 31 | "geom_label","x,y,label,alpha,angle,color,family,fontface,hjust,lineheight,size,vjust,position","e","geom_label(aes(label=cty),nudge_x=1,nudge_y=1,check_overlap=TRUE)","ggplot(mpg,aes(cty,hwy))","","mpg" 32 | "geom_line","x,y,alpha,color,group,linetype,size","i","geom_line()","ggplot(economics,aes(date,unemploy))","","economics" 33 | "geom_map","map_id,alpha,color,fill,linetype,size","k","geom_map(aes(map_id=state),map=map)","ggplot(datak,aes(fill=murder))","expand_limits(x=map$long,y=map$lat)","datak" 34 | "geom_path","x,y,alpha,color,group,linetype,size","a","geom_path(lineend=""butt"",linejoin=""round"",linemitre=1)","ggplot(economics,aes(x=date,y=unemploy))","","economics" 35 | "geom_point","x,y,alpha,color,fill,shape,size,stroke","e","geom_point()","ggplot(mpg,aes(cty,hwy))","","mpg" 36 | "geom_pointrange","x,y,ymax,ymin,alpha,color,fill,group,linetype,shape,size","j","geom_pointrange()","ggplot(dfj,aes(grp,fit,ymin=fit-se,ymax=fit+se))","","dfj" 37 | "geom_polygon","x,y,alpha,color,fill,group,linetype,size","a","geom_polygon(aes(group=group))","ggplot(economics,aes(x=date,y=unemploy))","","economics" 38 | "geom_qq","x,y,alpha,color,fill,size,linetype,weight,sample","c2","geom_qq()","ggplot(mpg)","","mpg" 39 | "geom_quantile","x,y,alpha,color,group,linetype,size,weight","e","geom_quantile()","ggplot(mpg,aes(cty,hwy))","","mpg" 40 | "geom_raster","x,y,alpha,fill","l","geom_raster(aes(fill=z),hjust=0.5,vjust=0.5,interpolate=FALSE)","ggplot(seals,aes(long,lat))","","seals" 41 | "geom_rect","xmin,xmax,ymin,ymax,alpha,color,fill,size,linetype","b","geom_rect(aes(xmin=long,ymin=lat,xmax=long+1,ymax=lat+1))","ggplot(seals,aes(x=long,y=lat))","","seals" 42 | "geom_ribbon","x,ymax,ymin, alpha,color,fill,group,size,linetype","a","geom_ribbon(aes(ymin-unemploy-900,ymax=unemploy+900))","ggplot(economics,aes(x=date,y=unemploy))","","economics" 43 | "geom_rug","x,y,alpha,color,linetype,size","e","geom_rug(sides=""bl"")","ggplot(mpg,aes(cty,hwy))","","mpg" 44 | "geom_segment","x,xend,y,yend,alpha,color,size,linetype","b","geom_segment(aes(yend=lat+1,xend=long+1))","ggplot(seals,aes(x=long,y=lat))","","seals" 45 | "geom_smooth","x,y,alpha,color,fill,group,linetype,size,weight","e","geom_smooth(method=lm)","ggplot(mpg,aes(cty,hwy))","","mpg" 46 | "geom_spoke","angle,radius,x,y,alpha,color,size,linetype","b","geom_spoke(aes(angloe=1:1155,radius=1))","ggplot(seals,aes(x=long,y=lat))","","seals" 47 | "geom_step","x,y,alpha,color,group,linetype,size","i","geom_step(direction=""hv"")","ggplot(economics,aes(date,unemploy))","","economics" 48 | "geom_text","x,y,label,alpha,angle,color,family,fontface,hjust,lineheight,size,vjust,position","e","geom_text(aes(label=cty),nudge_x=1,nudge_y=1,check_overlap=TRUE)","ggplot(mpg,aes(cty,hwy))","","mpg" 49 | "geom_tile","x,y,alpha,color,fill,linetype,size,width","l","geom_tile(aes(fill=z))","ggplot(seals,aes(long,lat))","","seals" 50 | "geom_violin","x,y,alpha,color,fill,group,linetype,size,weight","f","geom_violin()","ggplot(mpg,aes(class,hwy))","","mpg" 51 | "geom_vline","xintercept,x,y,alpha,color,size,linetype","b","geom_vline(aes(xintercept=long))","ggplot(seals,aes(x=long,y=lat))","","seals" 52 | "stat_bin","x,y","c","stat_bin(binwidth=1,boundary=10)","ggplot(mpg,aes(hwy))","","mpg" 53 | "stat_bin_2d","x,y,fill","e","stat_bin_2d(bins=30,drop=T)","ggplot(mpg,aes(cty,hwy))","","mpg" 54 | "stat_bin_hex","x,y,fill","e","stat_bin_hex(bins=30)","ggplot(mpg,aes(cty,hwy))","","mpg" 55 | "stat_boxplot","x,y","f","stat_boxplot(coef=1.5)","ggplot(mpg,aes(class,hwy))","","mpg" 56 | "stat_contour","x,y,z,order","l","stat_contour(aes(z=z))","ggplot(seals,aes(long,lat))","","seals" 57 | "stat_count","x,y","c","stat_count(width=1)","ggplot(mpg,aes(hwy))","","mpg" 58 | "stat_density","x,y","c","stat_density(adjust=1,kernel=""gaussian"")","ggplot(mpg,aes(hwy))","","mpg" 59 | "stat_density_2d","x,y,color,size,fill","e","stat_density_2d(contour=TRUE,n=100)","ggplot(mpg,aes(cty,hwy))","","mpg" 60 | "stat_ecdf","x,y","e","stat_ecdf(n=40)","ggplot(mpg,aes(cty,hwy))","","mpg" 61 | "stat_ellipse","x,y,color,size","e","stat_ellipse(level=0.95,segments=51,type=""t"")","ggplot(mpg,aes(cty,hwy))","","mpg" 62 | "stat_function","x","m","stat_function(aes(x=-3:3),n=99,fun=dmorm,args(list(sd=0.5))","ggplot()","","" 63 | "stat_identity","x","e","stat_identity(na.rm=TRUE)","ggplot(mpg,aes(cty,hwy))","","mpg" 64 | "stat_qq","sample,group,x,y","m","stat_qq(aes(sample=1:100),dist=qt,dparam=list(df=5))","ggplot()","","" 65 | "stat_quantile","x,y","e","stat_quantile(quantiles=c(0.1,0.9),formula=y~log(x),method=""rq"")","ggplot(mpg,aes(cty,hwy))","","mpg" 66 | "stat_smooth","x,y","e","stat_smoooth(method='lm',formula=y~x,se=T,level=0.95)","ggplot(mpg,aes(cty,hwy))","","mpg" 67 | "stat_sum","x,y,size","e","stat_sum()","ggplot(mpg,aes(cty,hwy))","","mpg" 68 | "stat_summary","","e","stat_summary(fun.data=""mean_cl_boot"")","ggplot(mpg,aes(cty,hwy))","","mpg" 69 | "stat_summary_2d","x,y,z,fill","l","stat_summary_2d(aes(z=z),bins=30,fun=mean)","ggplot(seals,aes(long,lat))","","seals" 70 | "stat_summary_bin","","h","stat_summary_bin(fun.y=""mean"",geom=""bar"")","ggplot(diamonds,aes(carat,price))","","diamonds" 71 | "stat_summary_hex","x,y,z,fill","l","stat_summary_hex(aes(z=z),bins=30,fun=max)","ggplot(seals,aes(long,lat))","","seals" 72 | "stat_unique","","e","stat_unique()","ggplot(mpg,aes(cty,hwy))","","mpg" 73 | "stat_ydensity","x,y","f","stat_ydensity(kernel=""gaussian"",scale=""area"")","ggplot(mpg,aes(class,hwy))","","mpg" 74 | "theme_bw","","r","theme_bw()","ggplot(mpg,aes(fl))+geom_bar()","","mpg" 75 | "theme_classic","","r","theme_classic()","ggplot(mpg,aes(fl))+geom_bar()","","mpg" 76 | "theme_dark","","r","theme_dark()","ggplot(mpg,aes(fl))+geom_bar()","","mpg" 77 | "theme_economist","","p2","theme_economist()","ggplot(mtcars,aes(x=wt,y=mpg,colour=factor(gear)))","geom_point()+ggtitle(""Cars"")+scale_colour_economist()+scale_y_continuous(position = ""right"")","mtcars" 78 | "theme_excel","","p2","theme_excel()","ggplot(mtcars,aes(x=wt,y=mpg,colour=factor(gear)))","geom_point()+ggtitle(""Cars"")+scale_color_excel()","mtcars" 79 | "theme_fivethirtyeight","","p2","heme_fivethirtyeight()","ggplot(mtcars,aes(x=wt,y=mpg,colour=factor(gear)))","geom_point()+ggtitle(""Cars"")+geom_smooth(method='lm',se=FALSE)+scale_color_fivethirtyeight('cyl')","mtcars" 80 | "theme_gray","","r","theme_gray()","ggplot(mpg,aes(fl))+geom_bar()","","mpg" 81 | "theme_light","","r","theme_light()","ggplot(mpg,aes(fl))+geom_bar()","","mpg" 82 | "theme_linedraw","","r","theme_linedraw()","ggplot(mpg,aes(fl))+geom_bar()","","mpg" 83 | "theme_minimal","","r","theme_minimal()","ggplot(mpg,aes(fl))+geom_bar()","","mpg" 84 | "theme_stata","","p2","theme_stata()","ggplot(mtcars,aes(x=wt,y=mpg,colour=factor(gear)))","geom_point()+ggtitle(""Cars"")+scale_colour_stata()","mtcars" 85 | "theme_tufte","ticks","p1","theme_tufte() 86 | ","ggplot(mtcars,aes(x=wt,y=mpg))","geom_point()+ggtitle(""Cars"")+geom_rangeframe()+scale_x_continuous(breaks = extended_range_breaks()(mtcars$wt))+scale_y_continuous(breaks = extended_range_breaks()(mtcars$mpg)) 87 | ","mtcars" 88 | "theme_void","","r","theme_void()","ggplot(mpg,aes(fl))+geom_bar()","","mpg" 89 | "theme_wsj","","p2","theme_wsj()","ggplot(mtcars,aes(x=wt,y=mpg,colour=factor(gear)))","geom_point()+ggtitle(""Cars"")+scale_colour_wsj()","mtcars" 90 | "geom_blank","","","","","","" 91 | "geom_linerange","x,ymax,ymin,alpha,color,group,linetype,size","j","geom_linerange()","ggplot(dfj,aes(grp,fit,ymin=fit-se,ymax=fit+se))","","dfj" 92 | "scale_x_continuous","","","scale_x_continuous()","ggplot(mpg,aes(displ,hwy))","geom_point()","mpg" 93 | "scale_y_continuous","","","scale_y_continuous()","ggplot(mpg,aes(displ,hwy))","geom_point()","mpg" 94 | "scale_x_log10","","","","","","" 95 | "scale_y_log10","","","","","","" 96 | "scale_x_reverse","","","","","","" 97 | "scale_y_reverse","","","","","","" 98 | "scale_x_sqrt","","","","","","" 99 | "scale_y_sqrt","","","","","","" 100 | "scale_alpha","","","","","","" 101 | -------------------------------------------------------------------------------- /data-raw/setting.csv: -------------------------------------------------------------------------------- 1 | "geom","setting","input","value","quoted","placeholder" 2 | "geom_contour","lineend","select","round,butt,square",TRUE,"" 3 | "geom_path,geom_contour,geom_density2d,geom_density_2d,geom_quantile,stat_quantile","linejoin","select","round,mitre,bevel",TRUE,"" 4 | "geom_path,geom_contour,geom_denisty2d,geom_density_2d,geom_quantile","linemitre","numeric","1",FALSE,"" 5 | "geom_path,geom_segment,geom_curve","arrow","text","",FALSE,"arrow()" 6 | "geom_step","direction","select","hv,vh",TRUE,"" 7 | "geom_smooth,stat_smooth","method","select","auto,lm,glm,gam,loess,rlm",TRUE,"" 8 | "geom_smooth,stat_smooth","formula","text","y~x",FALSE,"" 9 | "geom_smooth,stat_smooth","se","checkbox","TRUE",FALSE,"" 10 | "facet_wrap,facet_grid","scales","select","fixed,free_x,free_y,free",TRUE,NA 11 | "facet_wrap","nrow,ncol","text","",FALSE,"NULL" 12 | "facet_grid","space","select","fixed,free_x,free_y,free",TRUE,"" 13 | "facet_grid","margins","checkbox","FALSE",FALSE,NA 14 | "facet_wrap","labeller","select","label_value,label_both,label_context,label_parsed,label_wrap_gen(),label_bquote()",FALSE,"" 15 | "geom_text,geom_label","parse","checkbox","FALSE",FALSE,"" 16 | "geom_text,geom_label","nudge_x","numeric","0",FALSE,"" 17 | "geom_text,geom_label","nudge_y","numeric","0",FALSE,"" 18 | "geom_text","check_overlap","checkbox","FALSE",FALSE,"" 19 | "stat_bin_2d,geom_contour,geom_hex,stat_bin_hex","bins","text","30",FALSE,"" 20 | "geom_bin2d,stat_bin_2d,geom_contour,geom_histogram,stat_bin,geom_freqpoly","binwidth","text","",FALSE,"" 21 | "geom_bar,geom_col,stat_count","width","text","",FALSE,"" 22 | "geom_boxplot","outlier.colour","text","",TRUE,"" 23 | "geom_boxplot","outlier.fill","text","",TRUE,"" 24 | "geom_boxplot","outlier.shape","numeric","19",FALSE,"" 25 | "geom_boxplot","outlier.size","numeric","1.5",FALSE,"" 26 | "geom_boxplot","outlier.stroke","numeric","0.5",FALSE,"" 27 | "geom_boxplot","outlier.alpha","numeric","1",FALSE,"" 28 | "geom_boxplot","notch","checkbox","FALSE",FALSE,"" 29 | "geom_boxplot","notchwidth","numeric","0.5",FALSE,"" 30 | "geom_boxplot","varwidth","checkbox","FALSE",FALSE,"" 31 | "geom_crossbar","fatten","numeric","2.5",FALSE,"" 32 | "geom_pointrange","fatten","numeric","4",FALSE,"" 33 | "geom_segment,geom_curve,geom_density_2d,geom_density2d,geom_path,geom_quantile,stat_quantile","lineend","select","butt,round,square",TRUE,"" 34 | "geom_curve","curvature","numeric","0.5",FALSE,"" 35 | "geom_curve","angle","numeric","90",FALSE,"" 36 | "geom_curve","ncp","numeric","5",FALSE,"" 37 | "stat_density,geom_density,geom_violin,stat_ydensity","bw","select","nrd0,nrd,ucv,bcv,SJ",TRUE,"" 38 | "stat_density,geom_density,geom_violin,stat_ydensity","adjust","numeric","1",FALSE,"" 39 | "stat_density,geom_density,geom_violin,stat_ydensity","kernel","select","gaussian,epanechnikov,rectangular,triangular,biweight,cosine,optcosine",TRUE,"" 40 | "stat_density,geom_density","n","numeric","512",FALSE,"" 41 | "geom_density,stat_density","trim","checkbox","FALSE",FALSE,"" 42 | "stat_density_2d","contour","checkbox","TRUE",FALSE,"" 43 | "stat_density_2d","n","numeric","100",FALSE,"" 44 | "stat_density_2d","h","text","",FALSE,"" 45 | "geom_dotplot,geom_hex,stat_bin_hex","binwidth","text","",FALSE,"" 46 | "geom_dotplot","binaxis","select","x,y",TRUE,"" 47 | "geom_dotplot","method","select","dotdensity,histodot",TRUE,"" 48 | "geom_dotplot","binpositions","select","bygroup,all",TRUE,"" 49 | "geom_dotplot","stackdir","select","up,down,center,centerwhole",TRUE,"" 50 | "geom_dotplot","stackratio","numeric","1",FALSE,"" 51 | "geom_dotplot","dotsize","numeric","1",FALSE,"" 52 | "geom_dotplot","stackgroups","checkbox","FALSE",FALSE,"" 53 | "geom_dotplot","origin","text","",FALSE,"" 54 | "geom_dotplot","right","checkbox","TRUE",FALSE,"" 55 | "geom_dotplot","width","numeric","0.9",FALSE,"" 56 | "stat_bin,geom_freqpoly,geom_histogram","bins","text","",FALSE,"" 57 | "stat_bin,geom_freqpoly,geom_histogram","center","text","",FALSE,"" 58 | "stat_bin,geom_freqpoly,geom_histogram","boundary","text","",FALSE,"" 59 | "stat_bin,geom_freqpoly,geom_histogram","breaks","text","",FALSE,"" 60 | "stat_bin,geom_freqpoly,geom_histogram","closed","select","right,left",TRUE,"" 61 | "stat_bin,geom_freqpoly,geom_histogram","pad","checkbox","FALSE",FALSE,"" 62 | "geom_jitter","width","numeric","0.4",FALSE,"" 63 | "geom_jitter","height","numeric","0.4",FALSE,"" 64 | "geom_label","label.padding","text","unit(0.25, ""lines"")",FALSE,"unit(0.25, ""lines"")" 65 | "geom_label","label.r","text","unit(0.15, ""lines"")",FALSE,"unit(0.15, ""lines"")" 66 | "geom_label","label.size","numeric","0.25",FALSE,"" 67 | "geom_map","map","text","",FALSE,"" 68 | "geom_qq,stat_qq","distribution","text","stats::qnorm",FALSE,"" 69 | "geom_qq,stat_qq","dparam","text","list()",FALSE,"" 70 | "stat_quantile,geom_quantile","quantiles","text","c(0.25,0.5,0.75)",FALSE,"" 71 | "stat_quantile,geom_quantile","formula","text","",FALSE,"" 72 | "stat_quantile,geom_quantile","method","select","rq,rqss",TRUE,"" 73 | "stat_quantile,geom_quantile","method.args","text","list()",FALSE,"" 74 | "geom_raster","hjust","numeric","0.5",FALSE,"" 75 | "geom_raster","vjust","numeric","0.5",FALSE,"" 76 | "geom_raster","interpolate","checkbox","FALSE",FALSE,"" 77 | "geom_rug","sides","text","bl",TRUE,"" 78 | "stat_smooth,geom_smooth","n","numeric","80",FALSE,"" 79 | "stat_smooth,geom_smooth","span","numeric","0.75",FALSE,"" 80 | "stat_smooth,geom_smooth","fullrange","checkbox","FALSE",FALSE,"" 81 | "stat_smooth,geom_smooth","level","numeric","0.95",FALSE,"" 82 | "stat_smooth,geom_smooth","method.args","text","list()",FALSE,"" 83 | "geom_violin,stat_ydensity","draw_quantiles","text","",FALSE,"" 84 | "geom_violin,stat_ydensity","trim","checkbox","TRUE",FALSE,"" 85 | "geom_violin,stat_ydensity","scale","select","area,count,width",TRUE,"" 86 | "guide_legend,guide_colorbar","title","text","",TRUE,"waiver()" 87 | "guide_legend,guide_colorbar","title.position","select",",top,bottom,left,right",TRUE,"" 88 | "guide_legend,guide_colorbar","title.theme","text","",FALSE,"element_text()" 89 | "guide_legend,guide_colorbar","title.hjust","text","",FALSE,"" 90 | "guide_legend,guide_colorbar","title.vjust","text","",FALSE,"" 91 | "guide_legend,guide_colorbar","label","checkbox","TRUE",FALSE,"" 92 | "guide_legend,guide_colorbar","label.position","select",",top,bottom,left,right",TRUE,"" 93 | "guide_legend,guide_colorbar","label.theme","text","",FALSE,"element_text()" 94 | "guide_legend,guide_colorbar","label.hjust","text","",FALSE,"" 95 | "guide_legend,guide_colorbar","label.vjust","text","",FALSE,"" 96 | "<<<<<<< HEAD","","","",NA,"" 97 | "guide_legend","keywidth","text","",FALSE,"A numeric or a unit() object" 98 | "guide_legend","keyheight","text","",FALSE,"A numeric or a unit() object" 99 | "=======","","","",NA,"" 100 | ">>>>>>> 911378438e589cebd0bfb14b730ef66d38ebdbeb","","","",NA,"" 101 | "guide_legend,guide_colorbar","direction","select",",horizontal,vertical",TRUE,"" 102 | "guide_legend,guide_colorbar","default.unit","select","line,npc,cm,inches,mm,points,picas,bigpts,dida,cicero,scaledpts,lines,char,native,snpc,strwidth,strheight,grobwidth,grobheight",TRUE,"" 103 | "guide_legend","override.aes","text","list()",FALSE,"" 104 | "guide_legend","nrow","text","",FALSE,"" 105 | "guide_legend","ncol","text","",FALSE,"" 106 | "guide_legend","byrow","checkbox","FALSE",FALSE,"" 107 | "guide_legend,guide_colorbar","reverse","checkbox","FALSE",FALSE,"" 108 | "guide_legend,guide_colorbar","order","text","0",FALSE,"" 109 | "guide_colorbar","barwidth","text","",FALSE,"A numeric or a unit() object" 110 | "guide_colorbar","barheight","text","",FALSE,"A numeric or a unit() object" 111 | "guide_colorbar","nbin","numeric","20",FALSE,"" 112 | "guide_colorbar","raster","checkbox","TRUE",FALSE,"" 113 | "guide_colorbar","ticks","checkbox","TRUE",FALSE,"" 114 | "guide_colorbar","draw.ulim","checkbox","TRUE",FALSE,"" 115 | "guide_colorbar","draw.llim","checkbox","TRUE",FALSE,"" 116 | "scale_x_continuous,scale_y_continuous,scale_x_log10,scale_y_log10,scale_x_reverse,scale_y_reverse,scale_x_sqrt,scale_y_sqrt","name","text","",TRUE,"waiver()" 117 | "scale_x_continuous,scale_y_continuous,scale_x_log10,scale_y_log10,scale_x_reverse,scale_y_reverse,scale_x_sqrt,scale_y_sqrt","breaks,minor_breaks,labels","text","",FALSE,"waiver()" 118 | "scale_x_continuous,scale_y_continuous,scale_x_log10,scale_y_log10,scale_x_reverse,scale_y_reverse,scale_x_sqrt,scale_y_sqrt","limits","text","",FALSE,"NULL" 119 | "scale_x_continuous,scale_y_continuous,scale_x_log10,scale_y_log10,scale_x_reverse,scale_y_reverse,scale_x_sqrt,scale_y_sqrt","expand","text","",FALSE,"waiver()" 120 | "scale_x_continuous,scale_y_continuous,scale_x_log10,scale_y_log10,scale_x_reverse,scale_y_reverse,scale_x_sqrt,scale_y_sqrt","oob","text","censor",FALSE,"" 121 | "scale_x_continuous,scale_y_continuous,scale_x_log10,scale_y_log10,scale_x_reverse,scale_y_reverse,scale_x_sqrt,scale_y_sqrt","na.value","text","NA_real_",FALSE,"" 122 | "scale_x_continuous,scale_y_continuous,scale_x_continuous,scale_y_continuous,scale_x_reverse,scale_y_reverse,scale_radius,scale_size","trans","select","identity,asn,atanh,boxcox,exp,log,log10,log1p,log2,logit,probability,probit,reciprocal,reverse,sqrt",TRUE,"" 123 | "scale_x_continuous,scale_x_log10,scale_x_reverse,scale_x_sqrt","position","select","bottom,top",TRUE,"" 124 | "scale_y_continuous,scale_y_log10,scale_y_reverse,scale_y_sqrt","position","select","left,right",TRUE,"" 125 | "scale_x_continuous,scale_y_continuous,scale_x_log10,scale_y_log10,scale_x_reverse,scale_y_reverse,scale_x_sqrt,scale_y_sqrt","sec.axis","text","",FALSE,"waiver()" 126 | "scale_colour_brewer,scale_fill_brewer,scale_colour_distiller,scale_fill_distiller","type","select","seq,div,qual",TRUE,"" 127 | "scale_colour_brewer,scale_fill_brewer,scale_colour_distiller,scale_fill_distiller","palette","select","1,BrBG,PiYG,PRGn,PuOr,RdBu,RdGy,RdYlBu,RdYlGn,Spectral,Accent,Dark2,Paired,Pastel1,Pastel2,Set1,Set2,Set3,Blues,BuGn,BuPu,GnBu,Greens,Greys,Oranges,OrRd,PuBu,PuBuGn,PuRd,Purples,RdPu,Reds,YlGn,YlGnBu,YlOrBr,YlOrRd",TRUE,"" 128 | "scale_colour_brewer,scale_fill_brewer","direction","text","1",FALSE,"" 129 | "scale_colour_distiller,scale_fill_distiller","direction","text","-1",FALSE,"" 130 | "scale_colour_distiller,scale_fill_distiller","values","text","",FALSE,"NULL" 131 | "scale_colour_distiller,scale_fill_distiller","space","text","Lab",TRUE,"" 132 | "scale_colour_distiller,scale_fill_distiller","na.values","text","grey50",TRUE,"" 133 | "scale_colour_distiller,scale_fill_distiller","guide","select","colourbar,legend",TRUE,"" 134 | "scale_colour_grey,scale_fill_grey","start","text","0.2",FALSE,"" 135 | "scale_colour_grey,scale_fill_grey","end","text","0.8",FALSE,"" 136 | "scale_colour_grey,scale_fill_grey","na.value","text","red",TRUE,"" 137 | "scale_colour_gradient,scale_fill_gradient","low","text","#132B43",TRUE,"" 138 | "scale_colour_gradient,scale_fill_gradient","high","text","#56B1F7",TRUE,"" 139 | "scale_colour_gradient,scale_fill_gradient,scale_colour_gradient2,scale_fill_gradient2,scale_colour_gradientn,scale_fill_gradientn","space","select","Lab",TRUE,"" 140 | "scale_colour_gradient,scale_fill_gradient,scale_colour_gradient2,scale_fill_gradient2,scale_colour_gradientn,scale_fill_gradientn","na.value","text","grey50",TRUE,"" 141 | "scale_colour_gradient,scale_fill_gradient,scale_colour_gradient2,scale_fill_gradient2,scale_colour_gradientn,scale_fill_gradientn","guide","select","colourbar,legend",TRUE,"" 142 | "scale_colour_gradient2,scale_fill_gradient2","low","text","muted('red')",TRUE,"" 143 | "scale_colour_gradient2,scale_fill_gradient2","mid","text","white",TRUE,"" 144 | "scale_colour_gradient2,scale_fill_gradient2","high","text","muted('blue')",TRUE,"" 145 | "scale_colour_gradientn,scale_fill_gradientn","colours","text","",FALSE,"" 146 | "scale_colour_gradient2,scale_fill_gradient2","midpoint","text","0",FALSE,"" 147 | "scale_shape,scale_shape_continuous,scale_shape_discrete","solid","checkbox","TRUE",FALSE,"" 148 | "scale_colour_identity,scale_fill_identity,scale_shape_identity,scale_linetype_identity,scale_alpha_identity,scale_size_identity","guide","text","none",TRUE,"" 149 | "scale_colour_manual,scale_fill_manual,scale_size_manual,scale_shape_manual,scale_linetype_manual,scale_alpha_manual","values","text","",FALSE,"" 150 | "scale_radius,scale_size","name,breaks,labels","text","",FALSE,"waiver()" 151 | "scale_radius,scale_size","limits","text","",FALSE,"NULL" 152 | "scale_radius,scale_size","range","text","c(1,6)",FALSE,"" 153 | "scale_radius,scale_size","guide","text","legend",TRUE,"" 154 | "scale_size_area","max_size","text","6",FALSE,"" 155 | "scale_colour_continuous,scale_fill_continuous","type","select","gradient,viridis",TRUE,"" 156 | "scale_alpha,scale_alpha_continuous,scale_alpha_ordinal","range","text","c(0.1,1)",FALSE,"" 157 | "scale_colour_hue,scale_fill_hue","h","text","c(0,360)+15",FALSE,"" 158 | "scale_colour_hue,scale_fill_hue","c","text","100",FALSE,"" 159 | "scale_colour_hue,scale_fill_hue","l","text","65",FALSE,"" 160 | "scale_colour_hue,scale_fill_hue","h.start","text","0",FALSE,"" 161 | "scale_colour_hue,scale_fill_hue","direction","select","1,-1",TRUE,"" 162 | "scale_colour_hue,scale_fill_hue","na.value","text","grey50",TRUE,"" 163 | "scale_x_date,scale_y_date,scale_x_datetime,scale_y_datetime,scale_x_time,scale_y_time","name,breaks,minor_breaks,labels,expand","text","",FALSE,"waiver()" 164 | "scale_x_date,scale_y_date,scale_x_datetime,scale_y_datetime","date_breaks,date_labels,date_minor_breaks","text","",FALSE,"waiver()" 165 | "scale_x_date,scale_y_date,scale_x_datetime,scale_y_datetime,scale_x_time,scale_y_time","limits","text","",FALSE,"NULL" 166 | "scale_x_date,scale_x_datetime,scale_x_time","position","select","bottom,top",TRUE,"" 167 | "scale_y_date,scale_y_datetime,scale_y_time","position","select","left,right",TRUE,"" 168 | "scale_x_datetime,scale_y_datetime","timezone","text","",FALSE,"NULL" 169 | "scale_x_time,scale_y_time","oob","text","censor",FALSE,"" 170 | "scale_x_time,scale_y_time","na.value","text","NA_real_",FALSE,"" 171 | "margin","t,r,b,l","text","0",FALSE,"" 172 | "margin","unit","select","pt,line,npc,cm,inches,mm,picas,bigpts,dida,cicero,scaledpts,lines,char,native,snpc,strwidth,strheight,grobwidth,grobheight",TRUE,"" 173 | "element_rect","fill","select","NULL",TRUE,"" 174 | "element_text","family","select","NULL,mono,sans,serif,Courier,Helvetica,Times",TRUE,"" 175 | "element_text","face","select","NULL,plain,italic,bold,bold.italic",TRUE,"" 176 | "element_rect,element_line,element_text","colour","select","NULL",TRUE,"" 177 | "element_rect,element_line,element_text","size","text","",FALSE,"NULL" 178 | "element_rect,element_line","linetype","select","NULL,blank,solid,dashed,dotted,dotdash,longdash,twodash",TRUE,"" 179 | "element_line","arrow","text","",FALSE,"arrow()" 180 | "element_text","hjust,vjust,angle,lineheight","text","",FALSE,"NULL" 181 | "element_text","margin","text","",FALSE,"margin()" 182 | "element_text","debug","checkbox","FALSE",FALSE,"" 183 | "arrow","angle","text","30",FALSE,"" 184 | "arrow","length","text","unit(0.25,""inches"")",FALSE,"unit(0.25,""inches"")" 185 | "arrow","ends","select","last, first,both",TRUE,"" 186 | "arrow","type","select","open,closed",TRUE,"" 187 | "theme_grey,theme_gray,theme_bw,theme_linedraw,theme_light,theme_dark,theme_minimal,theme_classic,theme_void,theme_test,theme_stata,theme_tufte","base_size","text","11",FALSE,"" 188 | "theme_grey,theme_gray,theme_bw,theme_linedraw,theme_light,theme_dark,theme_minimal,theme_classic,theme_void,theme_test","base_family","select",",mono,sans,serif,Courier,Helvetica,Times",TRUE,"" 189 | "theme_grey,theme_gray,theme_bw,theme_linedraw,theme_light,theme_dark,theme_minimal,theme_classic,theme_void,theme_test","base_line_size","text","base_size/22",FALSE,"" 190 | "theme_grey,theme_gray,theme_bw,theme_linedraw,theme_light,theme_dark,theme_minimal,theme_classic,theme_void,theme_test","base_rect_size","text","base_size/22",FALSE,"" 191 | "theme_wsj,theme_excel,theme_fivethirtyeight","base_size","text","12",FALSE,"" 192 | "theme_wsj","color","text","brown",TRUE,"" 193 | "theme_wsj,theme_economist,theme_economist_white,theme_fivethirtyeight,theme_stata","base_family","text","sans",TRUE,"" 194 | "theme_wsj","title_family","text","mono",TRUE,"" 195 | "theme_economist","base_size","text","10",FALSE,"" 196 | "theme_economist,theme_economist_white,theme_excel","horizontal","checkbox","TRUE",FALSE,"" 197 | "theme_economist","dkpanel","checkbox","FALSE",FALSE,"" 198 | "theme_economist","stata","checkbox","FALSE",FALSE,"" 199 | "theme_economist_white","gray_bg","checkbox","FALSE",FALSE,"" 200 | "theme_excel","base_family","text","",TRUE,"" 201 | "theme_stata","scheme","select","S2color,s2mono,s1color,s1rcolor,s1mono,s2manual,s1manual,sj",TRUE,"" 202 | "theme_tufte","base_family","text","serif",TRUE,"" 203 | "theme_tufte","ticks","checkbox","TRUE",FALSE,"" 204 | "element_line","lineend","select","NULL,round,butt,square",TRUE,"" 205 | "unit","x","text","",FALSE,"" 206 | "unit","units","select","line,npc,cm,inches,mm,points,picas,bigpts,dida,cicero,scaledpts,lines,char,native,snpc,strwidth,strheight,grobwidth,grobheight",TRUE,"" 207 | "coord_fixed","ratio","text","1",FALSE,"aspect ratio, expressed as y / x" 208 | "coord_cartesian,coord_fixed,coord_flip,coord_map,coord_quickmap,coord_sf","xlim,ylim","text","",FALSE,"Limits for the x and y axes" 209 | "coord_cartesian,coord_sf,coord_fixed,coord_flip,coord_quickmap","expand","checkbox","TRUE",FALSE,"If TRUE, the default, adds a small expansion factor to the limits to ensure that data and axes don't overlap. If FALSE, limits are taken exactly from the data or xlim/ylim." 210 | "coord_map","projection","select","mercator,sinusoidal,cylequalarea,cylindrical,rectangular,gall,mollweide,gilbert,azequidistant,azequalarea,gnomonic,perspectuve,orthographic,stereographic,laue,fisheye,newyorker,conic,simpleconic,guyou,squae,tetra,hex,harrison,trapezoidal,lune",TRUE,NA 211 | "coord_map","parameters","text","",FALSE,"unnamed parameters passed on mapproj::mapproject()" 212 | "coord_map","orientation","text","",FALSE,"projection orientation, which defaults to c(90, 0, mean(range(x)))" 213 | "coord_polar","theta","select","x,y",TRUE,"variable to map angle to (x or y)" 214 | "coord_polar","start","text","0",FALSE,"offset of starting point from 12 o'clock in radians" 215 | "coord_polar","direction","text","1",FALSE,"1, clockwise; -1, anticlockwise" 216 | "coord_sf","crs","text","",FALSE,"Use this to select a specific CRS. If not specified, will use the CRS defined in the first layer" 217 | "coord_sf","datum","text","sf::st_crs(4326)",FALSE,"CRS that provides datum to use when generating graticules" 218 | "coord_sf","ndiscr","text","100",FALSE,"number of segments to use for discretizing graticule lines; try increasing this when graticules look unexpected" 219 | "coord_trans","x,y","select","identity,log10,sqrt",TRUE,"" 220 | "coord_trans","limx,limy","text","",FALSE,"limits for x and y axes." 221 | "xlab","label","text","",TRUE,"The text for the x-axis label" 222 | "ylab","label","text","",TRUE,"The text for the y-axis label" 223 | "ggtitle","label","text","",TRUE,"The text for the plot title" 224 | "ggtitle","subtitle","text","",TRUE,"A text for subtitle" 225 | "labs","title","text","",TRUE,"The text for the plot title" 226 | "labs","subtitle","text","",TRUE,"The text for the plot subtitle" 227 | "labs","caption","text","",TRUE,"The text for the plot caption" 228 | "annotate","geom","select","text,rect,segment,pointrange",TRUE,"name of geom to use for annotation" 229 | "annotate","x,y,xmn,ymin,xmax,ymax,xend,yend","text","",FALSE,"positioning aesthetics " 230 | "annotation_custom","grob","text","",FALSE,"grob to display" 231 | "annotation_custom","xmin,ymin","text","-Inf",FALSE,"x location " 232 | "annotation_custom","xmax,ymax","text","Inf",FALSE,"y location" 233 | "annotation_logticks","base","text","10",FALSE,"the base of the log (default 10)" 234 | "annotation_logticks","side","text","bl",TRUE,"string containing any of ""trbl"", for top, right, bottom, and left" 235 | "annotation_logticks","scaled","checkbox","TRUE",FALSE,"s the data already log-scaled?" 236 | "annotation_logticks","short","text","unit(0.1, ""cm"")",FALSE,"unit(0.1, ""cm"")" 237 | "annotation_logticks","mid","text","unit(0.2,""cm"")",FALSE,"unit(0.2,""cm"")" 238 | "annotation_logticks","long","text","unit(0.3,""cm"")",FALSE,"unit(0.3,""cm"")" 239 | "annotation_logticks","colour","select","black",TRUE,"" 240 | "annotation_logticks","size","text","0.5",FALSE,"" 241 | "annotation_logticks","linetype","select","solid,blank,dashed,dotted,dotdash,longdash,twodash",TRUE,"" 242 | "annotation_logticks","alpha","text","1",FALSE,"" 243 | "annotation_map","map","text","",FALSE,"data frame representing a map" 244 | "annotation_raster","raster","text","",FALSE,"raster object to display" 245 | "annotation_raster","xmin,xmax,ymin,ymax","text","",FALSE,"x, y location (in data coordinate)" 246 | "annotation_raster","interpolate","checkbox","FALSE",FALSE,"If TRUE interpolate linearly, if FALSE (the default) don't interpolate" 247 | "borders","database","select","world,usa,state,county",TRUE,NA 248 | "borders","region","text",".",TRUE,"map region" 249 | "borders","fill","select","NA,",TRUE,"" 250 | "borders","colour","select","grey50,",TRUE,"" 251 | "borders","xlim","text","",FALSE,"NULL" 252 | "borders","ylim","text","",FALSE,"NULL" 253 | "xlim,ylim","min,max","text","",FALSE,"" 254 | "facet_grid,facet_wrap","shrink","checkbox","TRUE",FALSE,NA 255 | "facet_grid,facet_wrap","as.table","checkbox","TRUE",FALSE,"" 256 | "facet_wrap,facet_grid","drop","checkbox","TRUE",FALSE,NA 257 | "facet_grid,facet_wrap","switch","select","NULL,x,y",TRUE,"By default, the labels are displayed on the top and right of the plot" 258 | "facet_wrap","dir","select","h,v",TRUE,"" 259 | "facet_wrap","strip.position","select","top,bottom,left,right",TRUE,NA 260 | "facet_grid","labeller","select","label_value,label_both,label_context,label_parsed,label_wrap_gen(),label_bquote()",FALSE,"" 261 | "theme","line","select","element_line(),element_blank()",FALSE,NA 262 | "theme","line","select","element_line(),element_blank()",FALSE,NA 263 | "label_value,label_both,label_context,label_parsed","labels","text","",FALSE,"Data frame of labels. " 264 | "label_wrap_gen","width","text","25",FALSE,"Maximum number of characters before wrapping the strip." 265 | "label_value,label_both,label_context,label_parsed,label_wrap_gen","multi_line","checkbox","TRUE",FALSE,"Whether to display the labels of multiple factors on separate lines" 266 | "label_both,label_context","sep","text",": ",TRUE,"String separating variables and values." 267 | "position_dodge,position_dodge2","width","text","",FALSE,"Dodging width, when different to the width of the individual elements. " 268 | "position_dodge","preserve","select","total,single",TRUE,"" 269 | "position_dodge","padding","text","0.1",FALSE,"Padding between elements at the same position. " 270 | "position_dodge2","reverse","checkbox","FALSE",FALSE,"If TRUE, will reverse the default stacking order. This is useful if you're rotating both the plot and legend." 271 | "position_stack,position_fill","vjust","text","1",FALSE,"Vertical adjustment for geoms that have a position (like points or lines), not a dimension (like bars or areas). 0-1" 272 | "position_stack,position_fill","reverse","checkbox","FALSE",FALSE,"if TRUE, will reverse the default stacking order. This is useful if you're rotating both the plot and legend." 273 | "position_jitter","width","text","NULL",FALSE,"Amount of horizontal jitter." 274 | "position_jitter","height","text","NULL",FALSE,"Amount of vertical jitter." 275 | "position_jitter","seed","text","",FALSE,"A random seed to make the jitter reproducible." 276 | "position_jitterdodge","jitter.width","text","NULL",FALSE,"degree of jitter in x direction. Defaults to 40% of the resolution of the data." 277 | "position_jitterdodge","jitter.height","text","0",FALSE,"degree of jitter in y direction. Defaults to 0." 278 | "position_jitterdodge","dodge.width","text","0.75",FALSE,"the amount to dodge in the x direction. Defaults to 0.75, the default position_dodge() width." 279 | "position_nudge","x,y","text","0",FALSE,"Amount of vertical and horizontal distance to move. 280 | " 281 | "position_dodge2","preserve","select","single,total",TRUE,"" 282 | "label_bquote","rows","text","",FALSE,"NULL" 283 | "label_bquote","cols","text","",FALSE,"NULL" 284 | "label_bquote","default","text","label_value",FALSE,"" 285 | "geom_text,geom_label","vjust,hjust","text","",FALSE,"" 286 | -------------------------------------------------------------------------------- /data-raw/theme.csv: -------------------------------------------------------------------------------- 1 | "group","setting","input","value","quoted","placeholder" 2 | "all","line","select","element_line(),element_blank()",FALSE,"" 3 | "all","rect","select","element_rect(),element_blank()",FALSE,"" 4 | "all","text,title","select","element_text(),element_blank()",FALSE,"" 5 | "all","aspect.ratio","text","",FALSE,"" 6 | "axis","axis.title,axis.title.x,axis.title.x.top,axis.title.x.bottom,axis.title.y,axis.title.y.left,axis.title.y.right,axis.text,axis.text.x,axis.text.x.top,axis.text.x.bottom,axis.text.y,axis.text.y.left,axis.text.y.right","select","element_text(),element_blank()",FALSE,"" 7 | "axis","axis.ticks,axis.ticks.x,axis.ticks.x.top,axis.ticks.x.bottom,axis.ticks.y,axis.ticks.y.left,axis.ticks.y.right","select","element_line(),element_blank()",FALSE,"" 8 | "axis","axis.ticks.length","text","unit()",FALSE,"" 9 | "axis","axis.line,axis.line.x,axis.line.x.top,axis.line.x.bottom,axis.line.y,axis.line.y.left,axis.line.yright","select","element_line(),element_blank()",FALSE,"" 10 | "legend","legend.background","select","element_rect(),element_blank()",FALSE,"" 11 | "legend","legend.margin","text","margin()",FALSE,"" 12 | "legend","legend.spacing,legend.spacing.x,legend.spacing.y","text","unit()",FALSE,"" 13 | "legend","legend.key","select","element_rect(),element_blank()",FALSE,"" 14 | "legend","legend.key.size,legend.key.height,legend.key.width","text","unit()",FALSE,"" 15 | "legend","legend.text","select","element_text(),element_blank()",FALSE,"" 16 | "legend","legend.text.align","text","",FALSE,"alignment of legend labels (number from 0 (left) to 1 (right))" 17 | "legend","legend.title","select","element_text(),element_blank()",FALSE,"" 18 | "legend","legend.title.align","text","",FALSE,"alignment of legend title (number from 0 (left) to 1 (right))" 19 | "legend","legend.position","select",",right,bottom,left,top,none",TRUE,"" 20 | "legend","legend.direction","select","horizontal,vertical",TRUE,"" 21 | "legend","legend.justification","text","",FALSE,"" 22 | "legend","legend.box","select","horizontal,vertical",TRUE,"" 23 | "legend","legend.box.just","select","top,bottom,left,right",TRUE,"" 24 | "legend","legend.box.margin","text","margin()",FALSE,"" 25 | "legend","legend.box.background","select","element_rect(),element_blank()",FALSE,"" 26 | "legend","legend.box.spacing","text","unit()",FALSE,"" 27 | "panel","panel.background","select","element_rect(),element_blank()",FALSE,"" 28 | "panel","panel.spacing,panel.spacing.x,panel.spacing.y","text","unit()",FALSE,"" 29 | "panel","panel.grid,panel.grid.major,panel.grid.minor,panel.grid.major.x,panel.grid.major.y,panel.grid.minor.x,panel.grid.minor.y","select","element_line(),element_blank()",FALSE,"" 30 | "panel","panel.ontop","checkbox","TRUE",FALSE,"" 31 | "plot","plot.background","select","element_rect(),element_blank()",FALSE,"" 32 | "plot","plot.title,plot.subtitle,plot.caption","select","element_text(),element_blank()",FALSE,"" 33 | "plot","plot.margin","text","margin()",FALSE,"" 34 | "strip","strip.background","select","element_rect(),element_blank()",FALSE,"" 35 | "strip","strip.placement","select","inside,outside",TRUE,"" 36 | "strip","strip.text,strip.text.x,strip.text.y","select","element_text(),element_blank()",FALSE,"" 37 | "strip","strip.switch.pad.grid,strip.switch.pad.wrap","text","unit()",FALSE,"" 38 | "etc","complete","checkbox","FALSE",FALSE,"" 39 | "etc","validate","checkbox","TRUE",FALSE,"" 40 | -------------------------------------------------------------------------------- /figure/unnamed-chunk-1-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardiomoon/ggplotAssist/1db61ade40f824ef42f027b6f4553ba46a325d05/figure/unnamed-chunk-1-1.png -------------------------------------------------------------------------------- /figure/unnamed-chunk-10-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardiomoon/ggplotAssist/1db61ade40f824ef42f027b6f4553ba46a325d05/figure/unnamed-chunk-10-1.png -------------------------------------------------------------------------------- /figure/unnamed-chunk-11-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardiomoon/ggplotAssist/1db61ade40f824ef42f027b6f4553ba46a325d05/figure/unnamed-chunk-11-1.png -------------------------------------------------------------------------------- /figure/unnamed-chunk-14-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardiomoon/ggplotAssist/1db61ade40f824ef42f027b6f4553ba46a325d05/figure/unnamed-chunk-14-1.png -------------------------------------------------------------------------------- /figure/unnamed-chunk-15-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardiomoon/ggplotAssist/1db61ade40f824ef42f027b6f4553ba46a325d05/figure/unnamed-chunk-15-1.png -------------------------------------------------------------------------------- /figure/unnamed-chunk-16-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardiomoon/ggplotAssist/1db61ade40f824ef42f027b6f4553ba46a325d05/figure/unnamed-chunk-16-1.png -------------------------------------------------------------------------------- /figure/unnamed-chunk-18-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardiomoon/ggplotAssist/1db61ade40f824ef42f027b6f4553ba46a325d05/figure/unnamed-chunk-18-1.png -------------------------------------------------------------------------------- /figure/unnamed-chunk-2-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardiomoon/ggplotAssist/1db61ade40f824ef42f027b6f4553ba46a325d05/figure/unnamed-chunk-2-1.png -------------------------------------------------------------------------------- /figure/unnamed-chunk-2-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardiomoon/ggplotAssist/1db61ade40f824ef42f027b6f4553ba46a325d05/figure/unnamed-chunk-2-2.png -------------------------------------------------------------------------------- /figure/unnamed-chunk-3-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardiomoon/ggplotAssist/1db61ade40f824ef42f027b6f4553ba46a325d05/figure/unnamed-chunk-3-1.png -------------------------------------------------------------------------------- /figure/unnamed-chunk-4-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardiomoon/ggplotAssist/1db61ade40f824ef42f027b6f4553ba46a325d05/figure/unnamed-chunk-4-1.png -------------------------------------------------------------------------------- /figure/unnamed-chunk-9-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardiomoon/ggplotAssist/1db61ade40f824ef42f027b6f4553ba46a325d05/figure/unnamed-chunk-9-1.png -------------------------------------------------------------------------------- /ggplotAssist.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 4 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | BuildType: Package 16 | PackageUseDevtools: Yes 17 | PackageInstallArgs: --no-multiarch --with-keep.source 18 | -------------------------------------------------------------------------------- /inst/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardiomoon/ggplotAssist/1db61ade40f824ef42f027b6f4553ba46a325d05/inst/.DS_Store -------------------------------------------------------------------------------- /inst/rstudio/addins.dcf: -------------------------------------------------------------------------------- 1 | Name: ggplotAssist 2 | Description: A Shiny App for Teaching and Learning 'ggplot2' 3 | Binding: ggplotAssist 4 | Interactive: true 5 | -------------------------------------------------------------------------------- /inst/textFunctionExample/app.R: -------------------------------------------------------------------------------- 1 | library(ggplotAssist) 2 | library(shiny) 3 | library(markdown) 4 | # Only run examples in interactive R sessions 5 | if(interactive()){ 6 | ui=fluidPage( 7 | h3("Recursive Shiny Module for Functionals"), 8 | hr(), 9 | HTML(markdownToHTML(fragment.only=TRUE, 10 | text="There are many functions that takes a function as an input : `Functionals`. 11 | To handle a functional in a shiny app, you have to make a shiny module that allows `recursive` call. 12 | I have included an recursive shiny module `textFunction` in my package ggplotAssist. 13 | The UI of textFunction shiny module is `textFunctionInput` and the server function is `textFunction`. 14 | Please try to enter the `element_text()` in the following textInput.")), 15 | hr(), 16 | textFunctionInput("text"), 17 | hr(), 18 | textOutput("text") 19 | ) 20 | server=function(input,output,session){ 21 | rv=reactiveValues() 22 | 23 | filename <- paste0(system.file(package="ggplotAssist"),"/textFunctionExample/setting.csv") 24 | rawData=read.csv(filename,stringsAsFactors = FALSE) 25 | settingData=splitData(rawData,"setting") 26 | settingData=splitData(settingData,"geom") 27 | rv$argList<-list(label="textFunctionInput",mode="text",value="",choices=NULL,width=200, 28 | bg="lightcyan",placeholder="element_text()") 29 | result=callModule(textFunction,"text",argList=reactive(rv$argList), 30 | editCode=reactive(TRUE),settingData=reactive(settingData)) 31 | output$text=renderText({ 32 | result() 33 | }) 34 | } 35 | shinyApp(ui,server) 36 | } 37 | 38 | -------------------------------------------------------------------------------- /inst/textFunctionExample/setting.csv: -------------------------------------------------------------------------------- 1 | "geom","setting","input","value","quoted","placeholder" 2 | "geom_contour","lineend","select","round,butt,square",TRUE,"" 3 | "geom_path,geom_contour,geom_density2d,geom_density_2d,geom_quantile,stat_quantile","linejoin","select","round,mitre,bevel",TRUE,"" 4 | "geom_path,geom_contour,geom_denisty2d,geom_density_2d,geom_quantile","linemitre","numeric","1",FALSE,"" 5 | "geom_path,geom_segment,geom_curve","arrow","text","",FALSE,"arrow()" 6 | "geom_step","direction","select","hv,vh",TRUE,"" 7 | "geom_smooth,stat_smooth","method","select","auto,lm,glm,gam,loess,rlm",TRUE,"" 8 | "geom_smooth,stat_smooth","formula","text","y~x",FALSE,"" 9 | "geom_smooth,stat_smooth","se","checkbox","TRUE",FALSE,"" 10 | "facet_wrap,facet_grid","scales","select","fixed,free_x,free_y,free",TRUE,NA 11 | "facet_wrap","nrow,ncol","text","",FALSE,"NULL" 12 | "facet_grid","space","select","fixed,free_x,free_y,free",TRUE,"" 13 | "facet_grid","margins","checkbox","FALSE",FALSE,NA 14 | "facet_wrap","labeller","select","label_value,label_both,label_context,label_parsed",FALSE,"" 15 | "geom_text,geom_label","parse","checkbox","FALSE",FALSE,"" 16 | "geom_text,geom_label","nudge_x","numeric","0",FALSE,"" 17 | "geom_text,geom_label","nudge_y","numeric","0",FALSE,"" 18 | "geom_text","check_overlap","checkbox","FALSE",FALSE,"" 19 | "stat_bin_2d,geom_contour,geom_hex,stat_bin_hex","bins","text","30",FALSE,"" 20 | "geom_bin2d,stat_bin_2d,geom_contour,geom_histogram,stat_bin,geom_freqpoly","binwidth","text","",FALSE,"" 21 | "geom_bar,geom_col,stat_count","width","text","",FALSE,"" 22 | "geom_boxplot","outlier.colour","text","",TRUE,"" 23 | "geom_boxplot","outlier.fill","text","",TRUE,"" 24 | "geom_boxplot","outlier.shape","numeric","19",FALSE,"" 25 | "geom_boxplot","outlier.size","numeric","1.5",FALSE,"" 26 | "geom_boxplot","outlier.stroke","numeric","0.5",FALSE,"" 27 | "geom_boxplot","outlier.alpha","numeric","1",FALSE,"" 28 | "geom_boxplot","notch","checkbox","FALSE",FALSE,"" 29 | "geom_boxplot","notchwidth","numeric","0.5",FALSE,"" 30 | "geom_boxplot","varwidth","checkbox","FALSE",FALSE,"" 31 | "geom_crossbar","fatten","numeric","2.5",FALSE,"" 32 | "geom_pointrange","fatten","numeric","4",FALSE,"" 33 | "geom_segment,geom_curve,geom_density_2d,geom_density2d,geom_path,geom_quantile,stat_quantile","lineend","select","butt,round,square",TRUE,"" 34 | "geom_curve","curvature","numeric","0.5",FALSE,"" 35 | "geom_curve","angle","numeric","90",FALSE,"" 36 | "geom_curve","ncp","numeric","5",FALSE,"" 37 | "stat_density,geom_density,geom_violin,stat_ydensity","bw","select","nrd0,nrd,ucv,bcv,SJ",TRUE,"" 38 | "stat_density,geom_density,geom_violin,stat_ydensity","adjust","numeric","1",FALSE,"" 39 | "stat_density,geom_density,geom_violin,stat_ydensity","kernel","select","gaussian,epanechnikov,rectangular,triangular,biweight,cosine,optcosine",TRUE,"" 40 | "stat_density,geom_density","n","numeric","512",FALSE,"" 41 | "geom_density,stat_density","trim","checkbox","FALSE",FALSE,"" 42 | "stat_density_2d","contour","checkbox","TRUE",FALSE,"" 43 | "stat_density_2d","n","numeric","100",FALSE,"" 44 | "stat_density_2d","h","text","",FALSE,"" 45 | "geom_dotplot,geom_hex,stat_bin_hex","binwidth","text","",FALSE,"" 46 | "geom_dotplot","binaxis","select","x,y",TRUE,"" 47 | "geom_dotplot","method","select","dotdensity,histodot",TRUE,"" 48 | "geom_dotplot","binpositions","select","bygroup,all",TRUE,"" 49 | "geom_dotplot","stackdir","select","up,down,center,centerwhole",TRUE,"" 50 | "geom_dotplot","stackratio","numeric","1",FALSE,"" 51 | "geom_dotplot","dotsize","numeric","1",FALSE,"" 52 | "geom_dotplot","stackgroups","checkbox","FALSE",FALSE,"" 53 | "geom_dotplot","origin","text","",FALSE,"" 54 | "geom_dotplot","right","checkbox","TRUE",FALSE,"" 55 | "geom_dotplot","width","numeric","0.9",FALSE,"" 56 | "stat_bin,geom_freqpoly,geom_histogram","bins","text","",FALSE,"" 57 | "stat_bin,geom_freqpoly,geom_histogram","center","text","",FALSE,"" 58 | "stat_bin,geom_freqpoly,geom_histogram","boundary","text","",FALSE,"" 59 | "stat_bin,geom_freqpoly,geom_histogram","breaks","text","",FALSE,"" 60 | "stat_bin,geom_freqpoly,geom_histogram","closed","select","right,left",TRUE,"" 61 | "stat_bin,geom_freqpoly,geom_histogram","pad","checkbox","FALSE",FALSE,"" 62 | "geom_jitter","width","numeric","0.4",FALSE,"" 63 | "geom_jitter","height","numeric","0.4",FALSE,"" 64 | "geom_label","label.padding","text","unit(0.25, ""lines"")",FALSE,"unit(0.25, ""lines"")" 65 | "geom_label","label.r","text","unit(0.15, ""lines"")",FALSE,"unit(0.15, ""lines"")" 66 | "geom_label","label.size","numeric","0.25",FALSE,"" 67 | "geom_map","map","text","",FALSE,"" 68 | "geom_qq,stat_qq","distribution","text","stats::qnorm",FALSE,"" 69 | "geom_qq,stat_qq","dparam","text","list()",FALSE,"" 70 | "stat_quantile,geom_quantile","quantiles","text","c(0.25,0.5,0.75)",FALSE,"" 71 | "stat_quantile,geom_quantile","formula","text","",FALSE,"" 72 | "stat_quantile,geom_quantile","method","select","rq,rqss",TRUE,"" 73 | "stat_quantile,geom_quantile","method.args","text","list()",FALSE,"" 74 | "geom_raster","hjust","numeric","0.5",FALSE,"" 75 | "geom_raster","vjust","numeric","0.5",FALSE,"" 76 | "geom_raster","interpolate","checkbox","FALSE",FALSE,"" 77 | "geom_rug","sides","text","bl",TRUE,"" 78 | "stat_smooth,geom_smooth","n","numeric","80",FALSE,"" 79 | "stat_smooth,geom_smooth","span","numeric","0.75",FALSE,"" 80 | "stat_smooth,geom_smooth","fullrange","checkbox","FALSE",FALSE,"" 81 | "stat_smooth,geom_smooth","level","numeric","0.95",FALSE,"" 82 | "stat_smooth,geom_smooth","method.args","text","list()",FALSE,"" 83 | "geom_violin,stat_ydensity","draw_quantiles","text","",FALSE,"" 84 | "geom_violin,stat_ydensity","trim","checkbox","TRUE",FALSE,"" 85 | "geom_violin,stat_ydensity","scale","select","area,count,width",TRUE,"" 86 | "guide_legend,guide_colorbar","title","text","",TRUE,"waiver()" 87 | "guide_legend,guide_colorbar","title.position","select",",top,bottom,left,right",TRUE,"" 88 | "guide_legend,guide_colorbar","title.theme","text","",FALSE,"element_text()" 89 | "guide_legend,guide_colorbar","title.hjust","text","",FALSE,"" 90 | "guide_legend,guide_colorbar","title.vjust","text","",FALSE,"" 91 | "guide_legend,guide_colorbar","label","checkbox","TRUE",FALSE,"" 92 | "guide_legend,guide_colorbar","label.position","select",",top,bottom,left,right",TRUE,"" 93 | "guide_legend,guide_colorbar","label.theme","text","",FALSE,"element_text()" 94 | "guide_legend,guide_colorbar","label.hjust","text","",FALSE,"" 95 | "guide_legend,guide_colorbar","label.vjust","text","",FALSE,"" 96 | "<<<<<<< HEAD","","","",NA,"" 97 | "guide_legend","keywidth","text","",FALSE,"A numeric or a unit() object" 98 | "guide_legend","keyheight","text","",FALSE,"A numeric or a unit() object" 99 | "=======","","","",NA,"" 100 | ">>>>>>> 911378438e589cebd0bfb14b730ef66d38ebdbeb","","","",NA,"" 101 | "guide_legend,guide_colorbar","direction","select",",horizontal,vertical",TRUE,"" 102 | "guide_legend,guide_colorbar","default.unit","select","line,npc,cm,inches,mm,points,picas,bigpts,dida,cicero,scaledpts,lines,char,native,snpc,strwidth,strheight,grobwidth,grobheight",TRUE,"" 103 | "guide_legend","override.aes","text","list()",FALSE,"" 104 | "guide_legend","nrow","text","",FALSE,"" 105 | "guide_legend","ncol","text","",FALSE,"" 106 | "guide_legend","byrow","checkbox","FALSE",FALSE,"" 107 | "guide_legend,guide_colorbar","reverse","checkbox","FALSE",FALSE,"" 108 | "guide_legend,guide_colorbar","order","text","0",FALSE,"" 109 | "guide_colorbar","barwidth","text","",FALSE,"A numeric or a unit() object" 110 | "guide_colorbar","barheight","text","",FALSE,"A numeric or a unit() object" 111 | "guide_colorbar","nbin","numeric","20",FALSE,"" 112 | "guide_colorbar","raster","checkbox","TRUE",FALSE,"" 113 | "guide_colorbar","ticks","checkbox","TRUE",FALSE,"" 114 | "guide_colorbar","draw.ulim","checkbox","TRUE",FALSE,"" 115 | "guide_colorbar","draw.llim","checkbox","TRUE",FALSE,"" 116 | "scale_x_continuous,scale_y_continuous,scale_x_log10,scale_y_log10,scale_x_reverse,scale_y_reverse,scale_x_sqrt,scale_y_sqrt","name","text","",TRUE,"waiver()" 117 | "scale_x_continuous,scale_y_continuous,scale_x_log10,scale_y_log10,scale_x_reverse,scale_y_reverse,scale_x_sqrt,scale_y_sqrt","breaks,minor_breaks,labels","text","",FALSE,"waiver()" 118 | "scale_x_continuous,scale_y_continuous,scale_x_log10,scale_y_log10,scale_x_reverse,scale_y_reverse,scale_x_sqrt,scale_y_sqrt","limits","text","",FALSE,"NULL" 119 | "scale_x_continuous,scale_y_continuous,scale_x_log10,scale_y_log10,scale_x_reverse,scale_y_reverse,scale_x_sqrt,scale_y_sqrt","expand","text","",FALSE,"waiver()" 120 | "scale_x_continuous,scale_y_continuous,scale_x_log10,scale_y_log10,scale_x_reverse,scale_y_reverse,scale_x_sqrt,scale_y_sqrt","oob","text","censor",FALSE,"" 121 | "scale_x_continuous,scale_y_continuous,scale_x_log10,scale_y_log10,scale_x_reverse,scale_y_reverse,scale_x_sqrt,scale_y_sqrt","na.value","text","NA_real_",FALSE,"" 122 | "scale_x_continuous,scale_y_continuous,scale_x_continuous,scale_y_continuous,scale_x_reverse,scale_y_reverse,scale_radius,scale_size","trans","select","identity,asn,atanh,boxcox,exp,log,log10,log1p,log2,logit,probability,probit,reciprocal,reverse,sqrt",TRUE,"" 123 | "scale_x_continuous,scale_x_log10,scale_x_reverse,scale_x_sqrt","position","select","bottom,top",TRUE,"" 124 | "scale_y_continuous,scale_y_log10,scale_y_reverse,scale_y_sqrt","position","select","left,right",TRUE,"" 125 | "scale_x_continuous,scale_y_continuous,scale_x_log10,scale_y_log10,scale_x_reverse,scale_y_reverse,scale_x_sqrt,scale_y_sqrt","sec.axis","text","",FALSE,"waiver()" 126 | "scale_colour_brewer,scale_fill_brewer,scale_colour_distiller,scale_fill_distiller","type","select","seq,div,qual",TRUE,"" 127 | "scale_colour_brewer,scale_fill_brewer,scale_colour_distiller,scale_fill_distiller","palette","select","1,BrBG,PiYG,PRGn,PuOr,RdBu,RdGy,RdYlBu,RdYlGn,Spectral,Accent,Dark2,Paired,Pastel1,Pastel2,Set1,Set2,Set3,Blues,BuGn,BuPu,GnBu,Greens,Greys,Oranges,OrRd,PuBu,PuBuGn,PuRd,Purples,RdPu,Reds,YlGn,YlGnBu,YlOrBr,YlOrRd",TRUE,"" 128 | "scale_colour_brewer,scale_fill_brewer","direction","text","1",FALSE,"" 129 | "scale_colour_distiller,scale_fill_distiller","direction","text","-1",FALSE,"" 130 | "scale_colour_distiller,scale_fill_distiller","values","text","",FALSE,"NULL" 131 | "scale_colour_distiller,scale_fill_distiller","space","text","Lab",TRUE,"" 132 | "scale_colour_distiller,scale_fill_distiller","na.values","text","grey50",TRUE,"" 133 | "scale_colour_distiller,scale_fill_distiller","guide","select","colourbar,legend",TRUE,"" 134 | "scale_colour_grey,scale_fill_grey","start","text","0.2",FALSE,"" 135 | "scale_colour_grey,scale_fill_grey","end","text","0.8",FALSE,"" 136 | "scale_colour_grey,scale_fill_grey","na.value","text","red",TRUE,"" 137 | "scale_colour_gradient,scale_fill_gradient","low","text","#132B43",TRUE,"" 138 | "scale_colour_gradient,scale_fill_gradient","high","text","#56B1F7",TRUE,"" 139 | "scale_colour_gradient,scale_fill_gradient,scale_colour_gradient2,scale_fill_gradient2,scale_colour_gradientn,scale_fill_gradientn","space","select","Lab",TRUE,"" 140 | "scale_colour_gradient,scale_fill_gradient,scale_colour_gradient2,scale_fill_gradient2,scale_colour_gradientn,scale_fill_gradientn","na.value","text","grey50",TRUE,"" 141 | "scale_colour_gradient,scale_fill_gradient,scale_colour_gradient2,scale_fill_gradient2,scale_colour_gradientn,scale_fill_gradientn","guide","select","colourbar,legend",TRUE,"" 142 | "scale_colour_gradient2,scale_fill_gradient2","low","text","muted('red')",TRUE,"" 143 | "scale_colour_gradient2,scale_fill_gradient2","mid","text","white",TRUE,"" 144 | "scale_colour_gradient2,scale_fill_gradient2","high","text","muted('blue')",TRUE,"" 145 | "scale_colour_gradientn,scale_fill_gradientn","colours","text","",FALSE,"" 146 | "scale_colour_gradient2,scale_fill_gradient2","midpoint","text","0",FALSE,"" 147 | "scale_shape,scale_shape_continuous,scale_shape_discrete","solid","checkbox","TRUE",FALSE,"" 148 | "scale_colour_identity,scale_fill_identity,scale_shape_identity,scale_linetype_identity,scale_alpha_identity,scale_size_identity","guide","text","none",TRUE,"" 149 | "scale_colour_manual,scale_fill_manual,scale_size_manual,scale_shape_manual,scale_linetype_manual,scale_alpha_manual","values","text","",FALSE,"" 150 | "scale_radius,scale_size","name,breaks,labels","text","",FALSE,"waiver()" 151 | "scale_radius,scale_size","limits","text","",FALSE,"NULL" 152 | "scale_radius,scale_size","range","text","c(1,6)",FALSE,"" 153 | "scale_radius,scale_size","guide","text","legend",TRUE,"" 154 | "scale_size_area","max_size","text","6",FALSE,"" 155 | "scale_colour_continuous,scale_fill_continuous","type","select","gradient,viridis",TRUE,"" 156 | "scale_alpha,scale_alpha_continuous,scale_alpha_ordinal","range","text","c(0.1,1)",FALSE,"" 157 | "scale_colour_hue,scale_fill_hue","h","text","c(0,360)+15",FALSE,"" 158 | "scale_colour_hue,scale_fill_hue","c","text","100",FALSE,"" 159 | "scale_colour_hue,scale_fill_hue","l","text","65",FALSE,"" 160 | "scale_colour_hue,scale_fill_hue","h.start","text","0",FALSE,"" 161 | "scale_colour_hue,scale_fill_hue","direction","select","1,-1",TRUE,"" 162 | "scale_colour_hue,scale_fill_hue","na.value","text","grey50",TRUE,"" 163 | "scale_x_date,scale_y_date,scale_x_datetime,scale_y_datetime,scale_x_time,scale_y_time","name,breaks,minor_breaks,labels,expand","text","",FALSE,"waiver()" 164 | "scale_x_date,scale_y_date,scale_x_datetime,scale_y_datetime","date_breaks,date_labels,date_minor_breaks","text","",FALSE,"waiver()" 165 | "scale_x_date,scale_y_date,scale_x_datetime,scale_y_datetime,scale_x_time,scale_y_time","limits","text","",FALSE,"NULL" 166 | "scale_x_date,scale_x_datetime,scale_x_time","position","select","bottom,top",TRUE,"" 167 | "scale_y_date,scale_y_datetime,scale_y_time","position","select","left,right",TRUE,"" 168 | "scale_x_datetime,scale_y_datetime","timezone","text","",FALSE,"NULL" 169 | "scale_x_time,scale_y_time","oob","text","censor",FALSE,"" 170 | "scale_x_time,scale_y_time","na.value","text","NA_real_",FALSE,"" 171 | "margin","t,r,b,l","text","0",FALSE,"" 172 | "margin","unit","select","pt,line,npc,cm,inches,mm,picas,bigpts,dida,cicero,scaledpts,lines,char,native,snpc,strwidth,strheight,grobwidth,grobheight",TRUE,"" 173 | "element_rect","fill","select","NULL",TRUE,"" 174 | "element_text","family","select","NULL,mono,sans,serif,Courier,Helvetica,Times",TRUE,"" 175 | "element_text","face","select","NULL,plain,italic,bold,bold.italic",TRUE,"" 176 | "element_rect,element_line,element_text","colour","select","NULL",TRUE,"" 177 | "element_rect,element_line,element_text","size","text","",FALSE,"NULL" 178 | "element_rect,element_line","linetype","select","NULL,blank,solid,dashed,dotted,dotdash,longdash,twodash",TRUE,"" 179 | "element_line","arrow","text","",FALSE,"arrow()" 180 | "element_text","hjust,vjust,angle,lineheight","text","",FALSE,"NULL" 181 | "element_text","margin","text","",FALSE,"margin()" 182 | "element_text","debug","checkbox","FALSE",FALSE,"" 183 | "arrow","angle","text","30",FALSE,"" 184 | "arrow","length","text","unit(0.25,""inches"")",FALSE,"unit(0.25,""inches"")" 185 | "arrow","ends","select","last, first,both",TRUE,"" 186 | "arrow","type","select","open,closed",TRUE,"" 187 | "theme_grey,theme_gray,theme_bw,theme_linedraw,theme_light,theme_dark,theme_minimal,theme_classic,theme_void,theme_test,theme_stata,theme_tufte","base_size","text","11",FALSE,"" 188 | "theme_grey,theme_gray,theme_bw,theme_linedraw,theme_light,theme_dark,theme_minimal,theme_classic,theme_void,theme_test","base_family","select",",",TRUE,"" 189 | "theme_grey,theme_gray,theme_bw,theme_linedraw,theme_light,theme_dark,theme_minimal,theme_classic,theme_void,theme_test","base_line_size","text","base_size/22",FALSE,"" 190 | "theme_grey,theme_gray,theme_bw,theme_linedraw,theme_light,theme_dark,theme_minimal,theme_classic,theme_void,theme_test","base_rect_size","text","base_size/22",FALSE,"" 191 | "theme_wsj,theme_excel,theme_fivethirtyeight","base_size","text","12",FALSE,"" 192 | "theme_wsj","color","text","brown",TRUE,"" 193 | "theme_wsj,theme_economist,theme_economist_white,theme_fivethirtyeight,theme_stata","base_family","text","sans",TRUE,"" 194 | "theme_wsj","title_family","text","mono",TRUE,"" 195 | "theme_economist","base_size","text","10",FALSE,"" 196 | "theme_economist,theme_economist_white,theme_excel","horizontal","checkbox","TRUE",FALSE,"" 197 | "theme_economist","dkpanel","checkbox","FALSE",FALSE,"" 198 | "theme_economist","stata","checkbox","FALSE",FALSE,"" 199 | "theme_economist_white","gray_bg","checkbox","FALSE",FALSE,"" 200 | "theme_excel","base_family","text","",TRUE,"" 201 | "theme_stata","scheme","select","S2color,s2mono,s1color,s1rcolor,s1mono,s2manual,s1manual,sj",TRUE,"" 202 | "theme_tufte","base_family","text","serif",TRUE,"" 203 | "theme_tufte","ticks","checkbox","TRUE",FALSE,"" 204 | "element_line","lineend","select","NULL,round,butt,square",TRUE,"" 205 | "unit","x","text","",FALSE,"" 206 | "unit","units","select","line,npc,cm,inches,mm,points,picas,bigpts,dida,cicero,scaledpts,lines,char,native,snpc,strwidth,strheight,grobwidth,grobheight",TRUE,"" 207 | "coord_fixed","ratio","text","1",FALSE,"aspect ratio, expressed as y / x" 208 | "coord_cartesian,coord_fixed,coord_flip,coord_map,coord_quickmap,coord_sf","xlim,ylim","text","",FALSE,"Limits for the x and y axes" 209 | "coord_cartesian,coord_sf,coord_fixed,coord_flip,coord_quickmap","expand","checkbox","TRUE",FALSE,"If TRUE, the default, adds a small expansion factor to the limits to ensure that data and axes don't overlap. If FALSE, limits are taken exactly from the data or xlim/ylim." 210 | "coord_map","projection","select","mercator,sinusoidal,cylequalarea,cylindrical,rectangular,gall,mollweide,gilbert,azequidistant,azequalarea,gnomonic,perspectuve,orthographic,stereographic,laue,fisheye,newyorker,conic,simpleconic,guyou,squae,tetra,hex,harrison,trapezoidal,lune",TRUE,NA 211 | "coord_map","parameters","text","",FALSE,"unnamed parameters passed on mapproj::mapproject()" 212 | "coord_map","orientation","text","",FALSE,"projection orientation, which defaults to c(90, 0, mean(range(x)))" 213 | "coord_polar","theta","select","x,y",TRUE,"variable to map angle to (x or y)" 214 | "coord_polar","start","text","0",FALSE,"offset of starting point from 12 o'clock in radians" 215 | "coord_polar","direction","text","1",FALSE,"1, clockwise; -1, anticlockwise" 216 | "coord_sf","crs","text","",FALSE,"Use this to select a specific CRS. If not specified, will use the CRS defined in the first layer" 217 | "coord_sf","datum","text","sf::st_crs(4326)",FALSE,"CRS that provides datum to use when generating graticules" 218 | "coord_sf","ndiscr","text","100",FALSE,"number of segments to use for discretizing graticule lines; try increasing this when graticules look unexpected" 219 | "coord_trans","x,y","select","identity,log10,sqrt",TRUE,"" 220 | "coord_trans","limx,limy","text","",FALSE,"limits for x and y axes." 221 | "xlab","label","text","",TRUE,"The text for the x-axis label" 222 | "ylab","label","text","",TRUE,"The text for the y-axis label" 223 | "ggtitle","label","text","",TRUE,"The text for the plot title" 224 | "ggtitle","subtitle","text","",TRUE,"A text for subtitle" 225 | "labs","title","text","",TRUE,"The text for the plot title" 226 | "labs","subtitle","text","",TRUE,"The text for the plot subtitle" 227 | "labs","caption","text","",TRUE,"The text for the plot caption" 228 | "annotate","geom","select","text,rect,segment,pointrange",TRUE,"name of geom to use for annotation" 229 | "annotate","x,y,xmn,ymin,xmax,ymax,xend,yend","text","",FALSE,"positioning aesthetics " 230 | "annotation_custom","grob","text","",FALSE,"grob to display" 231 | "annotation_custom","xmin,ymin","text","-Inf",FALSE,"x location " 232 | "annotation_custom","xmax,ymax","text","Inf",FALSE,"y location" 233 | "annotation_logticks","base","text","10",FALSE,"the base of the log (default 10)" 234 | "annotation_logticks","side","text","bl",TRUE,"string containing any of ""trbl"", for top, right, bottom, and left" 235 | "annotation_logticks","scaled","checkbox","TRUE",FALSE,"s the data already log-scaled?" 236 | "annotation_logticks","short","text","unit(0.1, ""cm"")",FALSE,"unit(0.1, ""cm"")" 237 | "annotation_logticks","mid","text","unit(0.2,""cm"")",FALSE,"unit(0.2,""cm"")" 238 | "annotation_logticks","long","text","unit(0.3,""cm"")",FALSE,"unit(0.3,""cm"")" 239 | "annotation_logticks","colour","select","black",TRUE,"" 240 | "annotation_logticks","size","text","0.5",FALSE,"" 241 | "annotation_logticks","linetype","select","solid,blank,dashed,dotted,dotdash,longdash,twodash",TRUE,"" 242 | "annotation_logticks","alpha","text","1",FALSE,"" 243 | "annotation_map","map","text","",FALSE,"data frame representing a map" 244 | "annotation_raster","raster","text","",FALSE,"raster object to display" 245 | "annotation_raster","xmin,xmax,ymin,ymax","text","",FALSE,"x, y location (in data coordinate)" 246 | "annotation_raster","interpolate","checkbox","FALSE",FALSE,"If TRUE interpolate linearly, if FALSE (the default) don't interpolate" 247 | "borders","database","select","world,usa,state,county",TRUE,NA 248 | "borders","region","text",".",TRUE,"map region" 249 | "borders","fill","select","NA,",TRUE,"" 250 | "borders","colour","select","grey50,",TRUE,"" 251 | "borders","xlim","text","",FALSE,"NULL" 252 | "borders","ylim","text","",FALSE,"NULL" 253 | "xlim,ylim","min,max","text","",FALSE,"" 254 | "facet_grid,facet_wrap","shrink","checkbox","TRUE",FALSE,NA 255 | "facet_grid,facet_wrap","as.table","checkbox","TRUE",FALSE,"" 256 | "facet_wrap,facet_grid","drop","checkbox","TRUE",FALSE,NA 257 | "facet_grid,facet_wrap","switch","select","NULL,x,y",TRUE,"By default, the labels are displayed on the top and right of the plot" 258 | "facet_wrap","dir","select","h,v",TRUE,"" 259 | "facet_wrap","strip.position","select","top,bottom,left,right",TRUE,NA 260 | "facet_grid","labeller","select","label_value,label_both,label_context,label_parsed,label_bquote",FALSE,"" 261 | "theme","line","select","element_line(),element_blank()",FALSE,NA 262 | "theme","line","select","element_line(),element_blank()",FALSE,NA 263 | "label_value,label_both,label_context,label_parsed","labels","text","",FALSE,"Data frame of labels. " 264 | "label_wrap_gen","width","text","25",FALSE,"Maximum number of characters before wrapping the strip." 265 | "label_value,label_both,label_context,label_parsed,label_wrap_gen","multi_line","checkbox","TRUE",FALSE,"Whether to display the labels of multiple factors on separate lines" 266 | "label_both,label_context","sep","text",": ",TRUE,"String separating variables and values." 267 | -------------------------------------------------------------------------------- /inst/textFunctionExample2/app.R: -------------------------------------------------------------------------------- 1 | library(ggplotAssist) 2 | library(shiny) 3 | library(markdown) 4 | library(stringr) 5 | # Only run examples in interactive R sessions 6 | if(interactive()){ 7 | ui=fluidPage( 8 | h3("Recursive Shiny Module for Functionals"), 9 | hr(), 10 | HTML(markdownToHTML(fragment.only=TRUE, 11 | text="There are many functions that takes a function as an input : `Functionals`. 12 | To handle a functional in a shiny app, you have to make a shiny module that allows `recursive` call. 13 | I have included an recursive shiny module `textFunction` in my package ggplotAssist. 14 | The UI of textFunction shiny module is `textFunctionInput` and the server function is `textFunction`. 15 | Please try to select one of the functions in the following selectInput.")), 16 | hr(), 17 | textFunctionInput("select"), 18 | hr(), 19 | textOutput("text") 20 | ) 21 | server=function(input,output,session){ 22 | rv=reactiveValues() 23 | 24 | filename <- paste0(system.file(package="ggplotAssist"),"/textFunctionExample/setting.csv") 25 | rawData=read.csv(filename,stringsAsFactors = FALSE) 26 | settingData=splitData(rawData,"setting") 27 | settingData=splitData(settingData,"geom") 28 | rv$argList<-list(label="Select function",mode="select", 29 | choices=c("element_text()","element_line()","guide_colorbar()","guide_legend()"),width=200 30 | ) 31 | result=callModule(textFunction,"select",argList=reactive(rv$argList), 32 | editCode=reactive(TRUE),settingData=reactive(settingData)) 33 | output$text=renderText({ 34 | result() 35 | }) 36 | 37 | } 38 | shinyApp(ui,server) 39 | } 40 | -------------------------------------------------------------------------------- /man/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardiomoon/ggplotAssist/1db61ade40f824ef42f027b6f4553ba46a325d05/man/.DS_Store -------------------------------------------------------------------------------- /man/ggplotAssist.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/ggplotAssist.R 3 | \name{ggplotAssist} 4 | \alias{ggplotAssist} 5 | \title{A shiny app for learn ggplot2} 6 | \usage{ 7 | ggplotAssist(df = NULL, viewer = "browser") 8 | } 9 | \arguments{ 10 | \item{df}{A tibble or a tbl_df or a data.frame to manipulate} 11 | 12 | \item{viewer}{Specify where the gadget should be displayed. Possible choices are c("dialog","browser","pane")} 13 | } 14 | \value{ 15 | An R code for ggplot 16 | } 17 | \description{ 18 | A shiny app for learn ggplot2 19 | } 20 | \examples{ 21 | library(tidyverse) 22 | library(rstudioapi) 23 | library(miniUI) 24 | library(moonBook) 25 | library(shinyAce) 26 | library(ggthemes) 27 | library(shiny) 28 | library(stringr) 29 | library(editData) 30 | library(shinyWidgets) 31 | library(gcookbook) 32 | library(shiny) 33 | # Only run examples in interactive R sessions 34 | if (interactive()) { 35 | result<-ggplotAssist(mtcars) 36 | result 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /man/selectizeInput3.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/ggplotAssist.R 3 | \name{selectizeInput3} 4 | \alias{selectizeInput3} 5 | \title{side-by-side selectizeInput} 6 | \usage{ 7 | selectizeInput3(..., width = 100) 8 | } 9 | \arguments{ 10 | \item{...}{Further arguments to be passed to selectizeInput} 11 | 12 | \item{width}{Input width in pixel} 13 | } 14 | \description{ 15 | side-by-side selectizeInput 16 | } 17 | \examples{ 18 | library(shiny) 19 | # Only run examples in interactive R sessions 20 | if (interactive()) { 21 | ui <- fluidPage( 22 | selectizeInput3("color", "color", choices=colors()) 23 | ) 24 | server <- function(input, output) { 25 | 26 | } 27 | shinyApp(ui, server) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /man/splitData.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/textFunction.R 3 | \name{splitData} 4 | \alias{splitData} 5 | \title{Elongate data.frame with column split by comma} 6 | \usage{ 7 | splitData(df, colname) 8 | } 9 | \arguments{ 10 | \item{df}{a data.frame} 11 | 12 | \item{colname}{column name} 13 | } 14 | \value{ 15 | An elongated data.frame 16 | } 17 | \description{ 18 | Elongate data.frame with column split by comma 19 | } 20 | -------------------------------------------------------------------------------- /man/textAreaInput4.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/textFunction.R 3 | \name{textAreaInput4} 4 | \alias{textAreaInput4} 5 | \title{Create side-by side textAreaInput with disabled spell check} 6 | \usage{ 7 | textAreaInput4(inputId, label, value = "", bg = NULL, width = "100\%", 8 | ...) 9 | } 10 | \arguments{ 11 | \item{inputId}{The input slot that will be used to access the value.} 12 | 13 | \item{label}{Display label for the control, or NULL for no label.} 14 | 15 | \item{value}{Initial value.} 16 | 17 | \item{bg}{backgroung color} 18 | 19 | \item{width}{The width of the input in pixel} 20 | 21 | \item{...}{arguments to be passed to textInput} 22 | } 23 | \description{ 24 | Create side-by side textAreaInput with disabled spell check 25 | } 26 | \examples{ 27 | library(shiny) 28 | # Only run examples in interactive R sessions 29 | if (interactive()) { 30 | ui <- fluidPage( 31 | textAreaInput4("Code","Code","") 32 | ) 33 | server <- function(input, output) { 34 | 35 | } 36 | shinyApp(ui, server) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /man/textFunction.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/textFunction.R 3 | \name{textFunction} 4 | \alias{textFunction} 5 | \title{Server function of textFunction shiny module} 6 | \usage{ 7 | textFunction(input, output, session, argList = reactive(argList), 8 | editCode = reactive(TRUE), settingData = reactive(NULL)) 9 | } 10 | \arguments{ 11 | \item{input}{input} 12 | 13 | \item{output}{output} 14 | 15 | \item{session}{session} 16 | 17 | \item{argList}{A list containing options} 18 | 19 | \item{editCode}{Logical. Wheter or not edit initial R code} 20 | 21 | \item{settingData}{A data.frame contains information about functions} 22 | } 23 | \description{ 24 | Server function of textFunction shiny module 25 | } 26 | -------------------------------------------------------------------------------- /man/textFunctionInput.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/textFunction.R 3 | \name{textFunctionInput} 4 | \alias{textFunctionInput} 5 | \title{UI of textFunction shiny module} 6 | \usage{ 7 | textFunctionInput(id) 8 | } 9 | \arguments{ 10 | \item{id}{A string} 11 | } 12 | \description{ 13 | UI of textFunction shiny module 14 | } 15 | \examples{ 16 | library(ggplotAssist) 17 | library(shiny) 18 | # Only run examples in interactive R sessions 19 | if(interactive()){ 20 | ui=fluidPage( 21 | textFunctionInput("text"), 22 | textOutput("text") 23 | ) 24 | server=function(input,output,session){ 25 | rv=reactiveValues() 26 | rawData=read.csv("data-raw/setting.csv",stringsAsFactors = FALSE) 27 | settingData=splitData(rawData,"setting") 28 | rv$argList<-list(label="text",mode="text",value="element_text()",choices=NULL,width=200, 29 | bg="lightcyan",placeholder="") 30 | result=callModule(textFunction,"text",argList=reactive(rv$argList), 31 | editCode=reactive(TRUE),settingData=reactive(settingData)) 32 | output$text=renderText({ 33 | result() 34 | }) 35 | } 36 | shinyApp(ui,server) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /man/textInput4.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/textFunction.R 3 | \name{textInput4} 4 | \alias{textInput4} 5 | \title{Create side-by side textInput with disabled spell check} 6 | \usage{ 7 | textInput4(inputId, label, value = "", width = 100, bg = NULL, ...) 8 | } 9 | \arguments{ 10 | \item{inputId}{The input slot that will be used to access the value.} 11 | 12 | \item{label}{Display label for the control, or NULL for no label.} 13 | 14 | \item{value}{Initial value.} 15 | 16 | \item{width}{The width of the input in pixel} 17 | 18 | \item{bg}{backgroung color} 19 | 20 | \item{...}{arguments to be passed to textInput} 21 | } 22 | \description{ 23 | Create side-by side textInput with disabled spell check 24 | } 25 | \examples{ 26 | library(shiny) 27 | # Only run examples in interactive R sessions 28 | if (interactive()) { 29 | ui <- fluidPage( 30 | textInput4("id", "id", ""), 31 | textInput4("name","name","") 32 | ) 33 | server <- function(input, output) { 34 | 35 | } 36 | shinyApp(ui, server) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /man/uiOutput3.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/textFunction.R 3 | \name{uiOutput3} 4 | \alias{uiOutput3} 5 | \title{Create side-by side uiOutput} 6 | \usage{ 7 | uiOutput3(...) 8 | } 9 | \arguments{ 10 | \item{...}{arguments to be passed to uiOutput} 11 | } 12 | \description{ 13 | Create side-by side uiOutput 14 | } 15 | \examples{ 16 | library(shiny) 17 | # Only run examples in interactive R sessions 18 | if (interactive()) { 19 | ui <- fluidPage( 20 | textInput4("name","name",""), 21 | uiOutput3("test") 22 | ) 23 | server <- function(input, output) { 24 | 25 | } 26 | shinyApp(ui, server) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /textFunctionInput.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Recursive Shiny Module for Functionals" 3 | author: "Keon-Woong Moon" 4 | date: "2017-11-03" 5 | output: rmarkdown::html_vignette 6 | vignette: > 7 | %\VignetteIndexEntry{textFunctinoInput} 8 | %\VignetteEngine{knitr::rmarkdown} 9 | %\VignetteEncoding{UTF-8} 10 | --- 11 | 12 | 13 | 14 | 15 | There are many functions that takes a function as an input : **Functionals**. To handle a functional in a shiny app, you have to make a shiny module that allows **recursive** call. I have included an recursive shiny module `textFunction` in my package ggplotAssist. The UI of textFunction shiny module is `textFunctionInput` and the server function is `textFunction`. I also included two toy shiny apps to demonstrate the recursive shiny module. 16 | 17 | 18 | ## Prerequisite 19 | 20 | You have to install the developmental version of R package `editData` from github. 21 | 22 | 23 | ```r 24 | #install.packages("devtools") 25 | devtools::install_github("cardiomoon/editData") 26 | ``` 27 | 28 | ## Install package 29 | 30 | You have to install the developmental version of `ggplotAssist` package from github. 31 | 32 | 33 | ```r 34 | devtools::install_github("cardiomoon/ggplotAssist") 35 | ``` 36 | 37 | ## Example 1 38 | 39 | After install the package `ggplotAssist`, you can run the first example app by the following R code. 40 | 41 | 42 | 43 | ```r 44 | shiny::runApp(system.file('textFunctionExample',package='ggplotAssist')) 45 | ``` 46 | 47 | Enter `element_text()` in the textInput(1). 48 | 49 | plot of chunk unnamed-chunk-4 50 | 51 | 52 | You can select font family(2) or colour(3). You can enter size(4). To adjust margin, enter `margin()` at the margin textInput(5). 53 | 54 | plot of chunk unnamed-chunk-5 55 | 56 | You can adjust dimensions of each margin(6,7) or ajdust default units of dimension(8). You can see the resultant R code for this function(arrow). 57 | 58 | 59 | plot of chunk unnamed-chunk-6 60 | 61 | 62 | ## Example 2 63 | 64 | You can use textFunctionInput as a selectInput. Please run the second example app by the following R code. 65 | 66 | 67 | 68 | ```r 69 | shiny::runApp(system.file('textFunctionExample2',package='ggplotAssist')) 70 | ``` 71 | Select `guide_colorbar()` among the selectInput(arrow). 72 | 73 | 74 | plot of chunk unnamed-chunk-8 75 | 76 | You can enter title(9) or select title.position(10). You can set the title.theme by enter `element_text()` in the textInput(11). 77 | 78 | plot of chunk unnamed-chunk-9 79 | 80 | You can adjust font family(12) or font face(13). Also you can set the margin by entering `margin()` in the textInput(14). 81 | 82 | plot of chunk unnamed-chunk-10 83 | 84 | 85 | You can see the source R code at the github page of package ggplotAssist: [https://github.com/cardiomoon/ggplotAssist](https://github.com/cardiomoon/ggplotAssist). 86 | -------------------------------------------------------------------------------- /vignettes/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cardiomoon/ggplotAssist/1db61ade40f824ef42f027b6f4553ba46a325d05/vignettes/.DS_Store -------------------------------------------------------------------------------- /vignettes/ggplotAssist.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "R package ggplotAssist" 3 | author: "Keon-Woong Moon" 4 | date: "`r Sys.Date()`" 5 | output: rmarkdown::html_vignette 6 | vignette: > 7 | %\VignetteIndexEntry{ggplotAssist} 8 | %\VignetteEngine{knitr::rmarkdown} 9 | %\VignetteEncoding{UTF-8} 10 | --- 11 | ```{r setup, include=FALSE} 12 | knitr::opts_chunk$set(echo = TRUE,comment = NA,fig.align='center',out.width="90%") 13 | ``` 14 | 15 | ``` 16 | The 'ggplotAssist' is an RStudio addin for teaching and learning plot generation using the 'ggplot2' package. You can learn each steps of plot generation - aesthetics mapping, select geometries, add scales, apply theme - by clicking your mouse without coding. You can see the resultant plot and see the each steps of plot layer by layer. You get resultant code for ggplot. 17 | ``` 18 | 19 | ## Prerequisite 20 | 21 | You have to install the developmental version of R package `editData` from github. 22 | 23 | ```{r,eval=FALSE} 24 | #install.packages("devtools") 25 | devtools::install_github("cardiomoon/editData") 26 | ``` 27 | 28 | ## Install package 29 | 30 | You can install `ggplotAssist` package from github. 31 | 32 | ```{r,eval=FALSE} 33 | #install.packages("devtools") 34 | devtools::install_github("cardiomoon/ggplotAssist") 35 | ``` 36 | 37 | ## Usage: As an RStudio Add-in 38 | 39 | This addin can be used to interactively generate a `ggplot` using `ggplot2` package. 40 | The intended way to use this is as follows: 41 | 42 | 1. Highlight a symbol naming a `data.frame` or a `tibble` in your R session, e.g. `msleep`(1). Execute this addin(arrow), to interactively manipulate it. 43 | 44 | ```{r,echo=FALSE} 45 | knitr::include_graphics("https://raw.githubusercontent.com/cardiomoon/ggplotAssistFigures/master/1.jpg") 46 | ``` 47 | 48 | 2. You can see a brower window. You can see the data name(1) and R code for ggplot(2). Select `x`(3) and `bodywt`(4) to map `bodywt` as a x-axis variable. 49 | 50 | ```{r,echo=FALSE} 51 | knitr::include_graphics("https://raw.githubusercontent.com/cardiomoon/ggplotAssistFigures/master/2.jpg") 52 | ``` 53 | 54 | ... 55 | 56 | 11. When you're done, the code for the ggplot will be emitted at the cursor position(scarlet rectangle). 57 | 58 | ```{r,echo=FALSE} 59 | knitr::include_graphics("https://raw.githubusercontent.com/cardiomoon/ggplotAssistFigures/master/12.jpg") 60 | ``` 61 | 62 | ## Usage: As a regular function 63 | 64 | You can use the `ggplotAssist()` function as a regular function, e.g. in a command line. 65 | 66 | ```{r,eval=FALSE} 67 | result <- ggplotAssist(mtcars) 68 | ``` 69 | 70 | ## Full vignette 71 | 72 | You can find full vignette here. http://rpubs.com/cardiomoon/321791 --------------------------------------------------------------------------------