README.md

lazytype

The R package lazytype provides addins for inserting code and running code in a different manner, and functions to allow interaction between scripts and between script and rmarkdown file.

Installation

The stable version on R CRAN is coming soon.

You can install the development version from Github with:

# install.packages("devtools")
devtools::install_github("FinYang/lazytype")

Usage

Keep the PC awake

dont_sign_me_out(hours = 3.5) moves mouse every 5 minutes for a certain time (default 3.5 hours) and print the time elapsed in the console. It is mainly used on public PC where it signs you out for a certain period of inactivity.

LazyScript

LazyScript operations helps with interacting with scripts and rmarkdown files, saves time to copy and paste and provides means to arrange code in a different way.

# test.R
## ---- library ----
library(tidyverse)
## ---- hello ----
print("Hello World")
library(lazytype)
script_test <- read_script("test.R", library = TRUE)
script_test %run% "hello"
#> [1] "Hello World"

read_script provides a knitr::read_chunk equivalent in script files.

copy_script_to_rmd("test.R", "test.Rmd", match_chunk = FALSE)

Addins

The package provides various addins, aiming to decrease keystrokes and clicks. A complete usage of addins please consult vignette.

License

This package is free and open source software, licensed under GPL-3.



FinYang/lazytex documentation built on May 5, 2023, 6:48 p.m.