Title: | Jot Down Values for Later |
---|---|
Description: | Reproducible work requires a record of where every statistic originated. When writing reports, some data is too big to load in the same environment and some statistics take a while to compute. This package offers a way to keep notes on statistics, simple functions, and small objects. Notepads can be locked to avoid accidental updates. Notepads keep track of who added the notes and when the notes were added. A simple text representation is used to allow for clear version histories. |
Authors: | Christopher T. Kenny [aut, cre] |
Maintainer: | Christopher T. Kenny <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.4 |
Built: | 2024-12-23 03:28:46 UTC |
Source: | https://github.com/christopherkenny/jot |
Get Current User
get_jot_user(user = "")
get_jot_user(user = "")
user |
user to override get with. Default is |
character
get_jot_user() get_jot_user(NA_character_)
get_jot_user() get_jot_user(NA_character_)
Get System Time as Integer
get_sys_time()
get_sys_time()
integer
get_sys_time()
get_sys_time()
Jot Down a Note
jot( note, name, overwrite = FALSE, user = get_jot_user(), time = get_sys_time(), pad = jot_active() ) write_jot( note, name, overwrite = FALSE, user = get_jot_user(), time = get_sys_time(), pad = jot_active() )
jot( note, name, overwrite = FALSE, user = get_jot_user(), time = get_sys_time(), pad = jot_active() ) write_jot( note, name, overwrite = FALSE, user = get_jot_user(), time = get_sys_time(), pad = jot_active() )
note |
data to save. required. |
name |
character, name of data. required. |
overwrite |
logical, default is FALSE. If a note of the same name exists, should it be overwritten? |
user |
name of user. default is |
time |
system time. default is |
pad |
path to file of pad to write to. default is |
path to pad, invisibly
tf <- tempfile() jot_new_pad(tf) jot_activate(tf) jot(3, 'example')
tf <- tempfile() jot_new_pad(tf) jot_activate(tf) jot(3, 'example')
Erase a Note
jot_erase(name, pad = jot_active())
jot_erase(name, pad = jot_active())
name |
character, name of note to erase. required. |
pad |
path to file of pad to write to. default is |
path to pad, invisibly
tf <- tempfile() jot_new_pad(tf) jot(3, 'example') jot_erase('example')
tf <- tempfile() jot_new_pad(tf) jot(3, 'example') jot_erase('example')
List out names of values in a jot notepad
jot_list(pad = jot_active())
jot_list(pad = jot_active())
pad |
path to notepad to open |
vlist of names of values in notepad
tf <- tempfile() jot_new_pad(tf) jot_activate(tf) jot('ex_val', 'ex') jot_list()
tf <- tempfile() jot_new_pad(tf) jot_activate(tf) jot('ex_val', 'ex') jot_list()
jot_lock()
locks a notepad so that jot
will not write to it.
jot_unlock()
unlocks a notepad so that jot
can write to it.
jot_lock(pad = jot_active()) jot_unlock(pad = jot_active())
jot_lock(pad = jot_active()) jot_unlock(pad = jot_active())
pad |
path to file to open |
path to pad, invisibly
tf <- tempfile() jot_new_pad(tf) jot_activate(tf) jot_lock() jot_unlock()
tf <- tempfile() jot_new_pad(tf) jot_activate(tf) jot_lock() jot_unlock()
Create new jot Notepad
jot_new_pad(pad = ".jot.yaml", title) jot_new(pad = ".jot.yaml", title)
jot_new_pad(pad = ".jot.yaml", title) jot_new(pad = ".jot.yaml", title)
pad |
path to file to store new notepad. |
title |
what to call the notepad. If not supplied, uses the name of the file. |
path to file, invisibly
tf <- tempfile() jot_new_pad(tf)
tf <- tempfile() jot_new_pad(tf)
jot_open()
and jot_activate()
opens an existing notepad and sets it to active.
jot_current()
and jot_active()
return the path to the current notepad.
jot_close()
and jot_deactivate()
closes the open notepad, if there is one.
jot_open(pad) jot_activate(pad) jot_active() jot_current() jot_close() jot_deactivate()
jot_open(pad) jot_activate(pad) jot_active() jot_current() jot_close() jot_deactivate()
pad |
path to file to open |
path to pad, invisibly
tf <- tempfile() jot_new_pad(tf) jot_open(tf) jot_active() jot_current() jot_close() jot_active()
tf <- tempfile() jot_new_pad(tf) jot_open(tf) jot_active() jot_current() jot_close() jot_active()
Read a jot notepad
jot_read(name, pad = jot_active()) read_jot(name, pad = jot_active())
jot_read(name, pad = jot_active()) read_jot(name, pad = jot_active())
name |
name of noteto read |
pad |
path to file to open |
value specified or all values
tf <- tempfile() jot_new_pad(tf) jot_activate(tf) jot(note = 'ex_note', name = 'ex_name') jot_read() jot_read('ex_name')
tf <- tempfile() jot_new_pad(tf) jot_activate(tf) jot(note = 'ex_note', name = 'ex_name') jot_read() jot_read('ex_name')
Read in all values from a jot notepad
jot_skim(pad = jot_active())
jot_skim(pad = jot_active())
pad |
path to file to open |
value specified or list of all values
tf <- tempfile() jot_new_pad(tf) jot_activate(tf) jot('ex_val', 'ex') jot_skim()
tf <- tempfile() jot_new_pad(tf) jot_activate(tf) jot('ex_val', 'ex') jot_skim()