Export code from esquisse for ggplot

Esquisse is a new package that provides a GUI for ggplot. More on esquisse, see my blog The good thing about esquisse is the fine tuning, for example exporting the code. Here follows an example. Life expectancy for sub sahara countries Let’s have a look at the data first setwd("/home/peter/test") health<-read.csv("health2.csv") head(health) ## year country life.expec gdp.cap code Total.as.percGDP ## 1 2000 Angola 46.621 606.2723 AGO 2.79 ## 2 2001 Angola 47. ...

#plot

bbc 3 plot

library('dplyr') ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union library('tidyr') library('gapminder') library('ggplot2') library('ggalt') library('forcats') library('R.utils') ## Loading required package: R.oo ## Loading required package: R.methodsS3 ## R.methodsS3 v1.7.1 (2016-02-15) successfully loaded. See ?R.methodsS3 for help. ## R.oo v1.22.0 (2018-04-21) successfully loaded. ...

#R Markdown

bbc 2

library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union library(tidyr) library(gapminder) library(ggplot2) library(ggalt) library(forcats) library(R.utils) ## Loading required package: R.oo ## Loading required package: R.methodsS3 ## R.methodsS3 v1.7.1 (2016-02-15) successfully loaded. See ?R.methodsS3 for help. ## R.oo v1.22.0 (2018-04-21) successfully loaded. ...