Title: | Personal Collection of Stuff and Things |
---|---|
Description: | Just another personal R package. This package provides no greater value to the R community, it is merely a place for me to dump stuff that I ended up writing and found mildly useful. |
Authors: | Lukas Burk [aut, cre] |
Maintainer: | Lukas Burk <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.4 |
Built: | 2025-02-11 04:42:58 UTC |
Source: | https://github.com/jemus42/jemisc |
Cite Used Packages
cite_loaded_pkgs()
cite_loaded_pkgs()
A tbl
cite_loaded_pkgs()
cite_loaded_pkgs()
Get a color palette from a coolors.co URL
coolors_pal(url)
coolors_pal(url)
url |
The link to a coolors.co palette, e.g.
|
character(5)
with RGB color codes, e.g.
c("#29adb2", "#182326", "#2a3a3f", "#69818c", "#8ea4b2")
for the example url
.
It's only the URL that's parsed, there's no need for an internet connection.
The url
does not need to be valid, since only hex strings of length 6 (i.e.
color codes like F75AB1
) are looked for, and a #
is prepended.
coolors_pal("https://coolors.co/29adb2-182326-2a3a3f-69818c-8ea4b2")
coolors_pal("https://coolors.co/29adb2-182326-2a3a3f-69818c-8ea4b2")
Create a .bib for Your Installed Packages
make_pkg_bib(output = "~/Documents/BibTex/rstats.bib", fresh = TRUE)
make_pkg_bib(output = "~/Documents/BibTex/rstats.bib", fresh = TRUE)
output |
Location of the output |
fresh |
Whether to overwrite |
Nothing
## Not run: make_pkg_bib(output = "~/packages.bib") ## End(Not run)
## Not run: make_pkg_bib(output = "~/packages.bib") ## End(Not run)
Print a matrix for LaTeX.
mattex(mat, type = "pmatrix", round = 3)
mattex(mat, type = "pmatrix", round = 3)
mat |
A matrix. |
type |
|
round |
|
Nothing, output is cat
ed.
mat <- matrix(1:9, ncol = 3) mattex(mat)
mat <- matrix(1:9, ncol = 3) mattex(mat)
Export installed packages for somehwat functional reinstallation
pkg_export(old_lib = "~/Library/R/shared_bak/")
pkg_export(old_lib = "~/Library/R/shared_bak/")
old_lib |
|
## Not run: pkg_export() ## End(Not run)
## Not run: pkg_export() ## End(Not run)
Print diceroll
## S3 method for class 'sr_d6' print(x, ...)
## S3 method for class 'sr_d6' print(x, ...)
x |
Object of class |
... |
Ignored |
Nothing
sr_d6(5)
sr_d6(5)
Use case: A bunch of stuff done in LaTeXiT, resulting in some helper calculations
or derivations contained in tex files. These are then rendered to PDF using tex_fun
, per
default tinytex::xelatex, and then optionally converted to png
using the system convert
tool via imagemagick.
render_tex_files( path, cleanup = TRUE, tex_fun = tinytex::xelatex, to_png = TRUE )
render_tex_files( path, cleanup = TRUE, tex_fun = tinytex::xelatex, to_png = TRUE )
path |
Folder where |
cleanup |
|
tex_fun |
Which function to use, default ist tinytex::xelatex. |
to_png |
|
Nothing
## Not run: render_tex_files("formulas") ## End(Not run)
## Not run: render_tex_files("formulas") ## End(Not run)
Get Current RStudio Daily Version
rs_daily()
rs_daily()
A character
of length 1
rs_daily()
rs_daily()
Get Current RStudio Preview Version
rs_preview()
rs_preview()
A character
of length 1
rs_preview()
rs_preview()
Get Current RStudio Version
rs_release()
rs_release()
A character
of length 1
rs_release()
rs_release()
Get Currently Installed RStudio Version
rs_version()
rs_version()
A character
of length 1
## Not run: rs_version() ## End(Not run)
## Not run: rs_version() ## End(Not run)
Roll some d6 for Shadowrun
sr_d6(n)
sr_d6(n)
n |
Number of d6 to roll |
A list
of additional class "sr_d6"
.
sr_d6(10)
sr_d6(10)
Use janitor::tabyl and various adorn_
-functions to create a tidy crosstab.
tidyxtab(data, x, y, row_name = deparse(x), col_name = deparse(y))
tidyxtab(data, x, y, row_name = deparse(x), col_name = deparse(y))
data |
A |
x |
The row-variable |
y |
The column-variable |
row_name , col_name
|
Passed to janitor::adorn_title. |
tidyxtab(mtcars, carb, gear)
tidyxtab(mtcars, carb, gear)