Welcome to rjutils
, a collection of enhanced functions for R
, notable :
- A custom
ggplot2
theme calledjtheme
- Plotting function helpers for
ggplot2
- Text modification function
rjutils
use the Source Sans Pro, which is an open source font from Google. It needs to be installed on your system and in R. It is located in the assets/
folder of the package. You will need the packages extrafont
and Rttf2pt1
in order to get the Source Sans Pro into R properly before you can use rjutils
.
- Install
ggplot2
andextrafont
packages :
install.packages("ggplot2")
install.packages("extrafont")
- Install
Rttf2
using theremotes
package :
install.packages("remotes")
library(remotes)
remotes::install_version("Rttf2pt1", version = "1.3.8")
- Import the Source Sans Pro font into R :
extrafont::font_import(path = "assets/")
- You can now install
rjutils
directly from GitHub :
install.packages(
?????????
)
- You can start using
rjutils
.
library(rjutils)
- Add function to avoid decimal on x-axis
- Move all others functions to jtheme or jutils prior to article 3
- Test error message for save_plot()
- Fix argument "bottom" in jarrange() that will put the label below the legend.
- Remove warnings() when using jarrange : Connot reproduce
- 50: In grid.Call(C_textBounds, as.graphicsAnnot(x$label), ... : largeur de police inconnue pour le caractère 0x20 : Cannot reproduce
- Add facet title and size to params of
jtheme(facet_size = 10L, facet_face = "bold")
- Added fast histogram
plot_hist(x, main, fill)
inplots.R
- Added fast scatter plot
plot_scatter(x, y, main, col)
inplots.R
- Added empty plot in
plot_void()
inplots.R
- Added another palette of colors (rainbow) in
pal_rbow
- Renamed
colors
palette topal_rdbu
and rearrange order of colors - Implemented
rotate_x_lab = 90, 45 and 30
instead ofTRUE
- Removed w and h for save_plot and save_ggplot. Replace by
size = c(w, h)
- Implemented
axes = FALSE
to remove axes for maps. To be used withlabs(x = NULL, y = NULL)
- Plot named color of palette when using
plot_pal
. Possibility to rotate names to 90°. Now accept list and vector. - Migrated
create_lagged_var
from data_weather to this package. - Migrated
interpolate_na
from data_weather to this package. - Migrated
xpaste0
from results to this package. - Migrated
narm
from results to this packages. - Combined all small low-level function in
helpers.R
- Got rid of .Rplots.pdf at the root of all Rproject
- Implemented option
title_hjust = 0.5
forjtheme()
- Added the operator
%nin%
which is equivalent to!(x %in% y)
- Added the function
render_md_github()
which allows conversion of .md to .html with Github format - Added the function
plot_cor_mat()
to plot a correlation matrix as a ggplot2 object with jtheme.