Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mitchhenderson

This is a package to store useful helper functions for personal use such as ggplot2 and gt themes, and social media captions.

Installation

You can install the development version of mitchhenderson from GitHub with:

# install.packages("devtools")
devtools::install_github("mitchhenderson/mitchhenderson-R-package")

Social captions

The social_caption() function generates a HTML string that, when rendered, shows LinkedIn, Bluesky, and GitHub usernames and icons.

library(mitchhenderson)

socials <- social_caption(icon_colour = "dodgerblue",
                          font_colour = "black")

socials
#> <span style='font-family:"Font Awesome 6 Brands";color: dodgerblue'>&#xf08c;</span> <span style='font-family: "Segoe UI";color: black'>Mitch Henderson</span>
#> <span style='font-family:"Font Awesome 6 Brands";color: dodgerblue'>&#xe671;</span> <span style='font-family: "Segoe UI";color: black'>mitchhenderson</span>
#> <span style='font-family:"Font Awesome 6 Brands";color: dodgerblue'>&#xf09b;</span> <span style='font-family: "Segoe UI";color: black'>mitchhenderson</span>

This can be used as a caption on ggplot objects.

New post

The new_post() function will create a new folder and .qmd file in the posts folder of my website project. The arguments to the function will pre-fill the YAML. This function was found on Thomas Mock’s blog with only a very minor modification to remove the console interactivity.

new_post(
   title = "My new post",
   description = "My new post is about xyz",
   draft = TRUE
)

Font hoist

The font_hoist() function registers all variants of a font as their own family. Useful when you want a particular style of a given font. This doesn’t persist between sessions so it needs to be called in every script the font needs to be used in.

font_hoist("Myriad Pro")

About

Helper Functions For Personal Projects

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages