Package 'bro'

Title: My personal R tools
Description: This package collects some functions I created for myself to facilitate certain tasks. I do not expect it to be very useful for anyone else, but if you think this can help you out, be my guest!
Authors: Bart Rogiers [cre, aut]
Maintainer: Bart Rogiers <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.9000
Built: 2025-01-20 04:42:07 UTC
Source: https://github.com/rogiersbart/bro

Help Index


Animate a set of pngs

Description

Animate a set of pngs

Usage

animate(
  dir,
  gif = "animation.gif",
  regexp = NULL,
  glob = NULL,
  delay = 2,
  loop = TRUE,
  max_size = 1200,
  repeat_last = 2
)

Launch git bash

Description

This behaves the same way as launching git bash through the start menu, explorer context menu or executable directly. The HOME environment variable is adjusted, as R uses the Documents subfolder of the standard HOME directory in git bash, so ".bash_profile" is correctly sourced on startup. The working directory will correspond to that of the R session.

Usage

bash()

Download photos from ouders.broekx.be

Description

Download photos from ouders.broekx.be

Usage

broekx_download(url = NULL, to = NULL)

Arguments

url

Email link to a page with images. If NULL (default), the URL is taken from the clipboard.

to

Directory to save the images. If NULL (default), the current working directory is used.


Load development packages

Description

Load development packages

Usage

dev()

Title

Description

Title

Usage

drive_download(id)

Arguments

id

Google drive file id


Title

Description

Title

Usage

drive_favicon(id)

Arguments

id

Title

Description

Title

Usage

drive_view(id)

Arguments

id

Google drive file id


Edit a file in RStudio

Description

Edit a file in RStudio

Usage

edit(path)

Arguments

path

Download high-resolution photos from gimme.eu based on a saved html

Description

Download high-resolution photos from gimme.eu based on a saved html

Usage

gimme_download(path = getwd(), max_size = 4000)

Arguments

path

folder where you saved the album html page, and the individual photos should be put instead, defaults to current working directory

max_size

maximum number of pixels for image width and height, defaults to 4000


Fix backslashes in a windows file path

Description

Shift

+ Right-click in the Windows file Explorer allows you to copy a file path, but it has backslashes. With this function, you get the forward slash version, so it can be used inside your R code.

Usage

path_fix(path)

Arguments

path

Path to process. If missing, the path is read from the clipboard.

Value

The fixed path, invisibly.


Plain text week planning

Description

Plain text week planning

Usage

plan_week(file = NULL, previous = NULL)

Arguments

file

File to write to, or "clipboard".

Value

The text, invisibly if written first to a file.


Plain text year planning

Description

Plain text year planning

Usage

plan_year(file = NULL, year = lubridate::year(lubridate::today()))

Arguments

file

File to write to, or "clipboard".

year

The year to use, defaults to the current year.

Value

The text, invisibly if written first to a file.


Title

Description

Title

Usage

pomodoro(minutes = 25)

Arguments

minutes

Setup dotfiles

Description

Setup dotfiles

Usage

setup_dotfiles(scope = "user")

Arguments

scope

Edit globally for the current user, or locally for the current project

Value

Invisible NULL.


Setup PowerToys

Description

Setup PowerToys

Usage

setup_powertoys()

Value

Invisible NULL.


Shortcuts for interactive use

Description

Shortcuts for interactive use

Usage

pkg(name)

last()

serve()

git()

Arguments

name

Package name to check


Title

Description

Title

Usage

sync(from, to, skip)

Arguments

to

Toggle between light and dark RStudio solarized themes

Description

The rsthemes solarized themes are used here, as they provide more consistent use of italics, better highlighting, etc. as the built-in solarized themes.

Usage

toggle()

light()

dark()