options(htmltools.dir.version = FALSE) library(ggplot2) library(pearsonverse) knitr::opts_chunk$set(comment = "#>")
--
--
--
--
--
class: center, middle
class: center, middle
background-image: url('intro_img/vispear_ex1.png') background-size: 70%
background-image: url('intro_img/vispear_ex2.png') background-size: 70%
background-image: url('intro_img/index_ex.png') background-size: 70%
background-image: url('intro_img/report_ex.png') background-size: 70%
class: middle, center
class: center, middle
--
Everybody in our team ...
--
--
--
--
class: center, middle
--
Collection of packages:
--
--
--
.bottom-text[ See pearsonverse documentation on GitHub. ]
All you have to do is:
# Install package devtools::install_github("pearsonplc/pearsonverse") # Attach package library(pearsonverse)
class: center middle no-page-number background-image: url('img/divider_blue.jpg') background-size: 100%
--
--
--
--
Throughout the entire project: Maintain reproducibility (skelpear)
class: center middle no-page-number background-image: url('img/divider_blue.jpg') background-size: 100%
.small-code[
skelpear::project_create(name = "project", path = ".")
]
--
Two arguments
--
name
- Project name. Must be a valid directory name for your file system.
--
path
- A path for storing your new project.
.small-code[
skelpear::project_create(name = "project", path = ".")
]
project_create()
, a new RStudio session will open automatically.--
git
environment..small-code[
skelpear::project_create(name = "project", path = ".")
]
--
.bottom-text[ More info about each directory in the documentation. ]
class: middle, center
To push your project to bitbucket, you need to do 2 things:
--
--
2. In terminal, use git remote add origin <remote_URL>
to link your local project with the bitbucket repository.
--
After that, you're ready to push your commit/s.
class: center middle no-page-number background-image: url('img/divider_blue.jpg') background-size: 100%
Basic layout .pull-three[ .small-code[
ggplot(mtcars,
aes(x = qsec,
y = mpg,
color = factor(cyl)
)
) +
geom_point(size = 5)
]]
.pull-seven[
ggplot(mtcars, aes(qsec, mpg, color = factor(cyl))) + geom_point(size = 5)
theme_enr layout .pull-three[ .small-code[
ggplot(mtcars,
aes(x = qsec,
y = mpg,
color = factor(cyl)
)
) +
geom_point(size = 5) +
theme_enr(color = p_colors)
]]
.pull-seven[
ggplot(mtcars, aes(qsec, mpg, color = factor(cyl))) + geom_point(size = 5) + theme_enr(color = p_colors)
Save plot
There are two functions:
save_plot()
- by default, it creates .png
file,save_plot2()
- by default, it creates two files at once, in png
and pdf
format.--
.small-code[
plot <- ggplot(mtcars, aes(qsec, mpg, color = factor(cyl))) + geom_point(size = 5) + theme_enr(color = p_colors) # .png and .pdf files are created save_plot2(name = plot, file = "graphs/01_mtcars")
]
.bottom-text[
Both functions are compatible with the theme_enr
layout.
]
class: middle, center
Show palettes
The function show_enr_palettes()
lists all palletes available in the vispear
package.
--
.small-code[
vispear::show_enr_palettes()
palette_list <- lapply(vispear::show_enr_palettes(), attributes) data.frame(name = names(palette_list), description = unlist(unname(palette_list)))
]
.small-code[
datatable_enr(mtcars, tooltip = "This is the description of table.")
]
.bottom-text[ Read more about the function in documentation (Epic or VPN required). ]
class: center middle no-page-number background-image: url('img/divider_blue.jpg') background-size: 100%
reppear::report_create(file = "01_report", subdir = "reports")
--
reppear::report_create(file = "01_report", subdir = "reports")
--
Two arguments
--
file
- Report name. Must be a valid directory name for your file system.
--
subdir
- Subdirectory where you want to store your new report.
reppear::report_create(file = "01_report", subdir = "reports")
--
01_report
- a directory which stores a report and all its dependendies. The report itself has a consistent layout.--
- index.Rmd
- a file which acts as a home page for all reports within the project*.
.bottom-text[ *More info about the file in documentation. ]
To render index.Rmd,
reppear::render_index()
--
It re/builds index.html, tooltip_content.html and header.html files.
class: middle, center
class: center middle no-page-number background-image: url('img/divider_blue.jpg') background-size: 100%
reppear::publish(file = "reports/")
.bottom-text[ For now only kvm1-e01.ioki.pl server is defined. ]
class: center middle no-page-number background-image: url('img/divider_blue.jpg') background-size: 100%
--
# Save your package environment snapshot_pkg() # Compare package environment compare_snapshot()
--
These two functions allow you to save and compare the packages used during the project. Use this if you want to make sure that others with whom you share the codebase have the same setup*.
.bottom-text[ *More info about how the functions work in documentation. ]
class: center, middle
--
--
--
--
--
class: middle, center
--
class: middle, center
class: no-page-number background-image: url('img/final.jpg') background-size: 100%
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.