The package website https://jmbarbone.github.io/mark/ is now available! More references and vignettes will make their way here in future releases.
detail(NA)
(or when x
has only
NA
values) no longer throws a warning and returns
NA
for min_c
, max_c
#59print.noted()
now passes ...
to next
methods #67assign_label()
#74
assign_label()
will be removed in
0.4.2
set_not_available()
now seems to work correctly – it
probably hasn’t actually be working most of the timepercentile_rank()
is now more correct when
x
is a decimal by checking for unique values first #92counts.data.frame()
now handle factor columns
better?handlers
, all allow for additional params
passed through ...
#34row_bind()
to bind a list of
data.frames()
#46drop_levels()
with factor
and
data.frame
methods; functions similarly to
base::droplevels()
but is a little faster #54todos()
and fixmes()
gain a new param
force
TRUE
, forces searches for .R
files
when the given directory does not contain an .Rproj
fileFALSE
, prevents long start ups when these
functions are called in a .Rprofile
file and R is not
launches in a project directorymark.todos.force
set_note()
, a wrapper for note<-()
#77fact2char()
to compliment char2fact()
#75print.pseudo_id()
now truncates long uniques to a
single line #70match_param(NULL, null = TRUE)
allows
param
to safely return NULL
#89fact_na()
is added to use fact
vectors
with NA
levels that work with is.na()
#69 and other
NA
handling improvementsprint._mark_bib_df()
method to supporting
printing listsfacts
:
as.integer.fact()
, as.double.fact()
,
remove_na.fact()
fact.numeric()
now treats NaN
the same as
NA
, no extra level/unique value is retainedread_clipboard()
now returns NA
when the
clipboard is empty, rather than ""
(improvements with
internal type conversions)NA
handling as wellutils::type.convert()
with some additional functionality
for logical (e.g., character string using "true"
and
"false"
) and for guessing dates in a
YYYY-MM-DD
formatdetails(factor)
no longer adds fact
class
to factors
#50details()
gains new argument factor_n
to
control threshold for making character vectors into factorsdetail.data.frame()
now works with single column
data.frames #48paste_combine()
no longer duplicated the second vector
of ...
when length(...) > 2
#52percentile_rank()
to calculate percentile ranks
with a vectorinsert()
to insert multiple values into a
vectorpseudo_id()
gains argument na_last
to
change positioning of NA
valuesis_true()
and is_false()
are now exported
as generics with methods for default
and
logical
omit_na()
for tracking positions of
NA
and non-NA
valuesquick_df(NULL)
now returns an empty
data.frame
quick_dfl()
exported as a wrapper for
quick_df(list(...))
squash_vec()
now works correctly when values are not
ordered #43as_ordered()
no longer duplicates ordered
class #44counts.data.frame()
and props.data.frame()
correctly make column names uniquetry_numeric()
correctly handles
NA
sflip.matrix(, keep_rownames = FALSE)
now works
correctlyany_match()
now works as expectedlines_of_r_code()
now works correctly reading a single
fileimport(, overwrite = TRUE)
now worksls_function()
, ls_object()
,
ls_dataframe()
, and ls_all()
have improvements
for environmental searchingassign_labels.data.frame(.missing = "warning")
correctly removes missing columnsremove_na.factor()
no long drops additional classes
other than ordered
and factor
struct()
overwriting attributes
improved and examplesfact.haven_labelled()
now returns an object with class
fact
#39; performance
enhancementsset_names0(NULL)
no longer causes an error and returns
NULL
#40diff_time()
correctly handles time zones when
x
is Date
and y
is
POSIXt
#41list_files()
) to try to not search every file depending on
desired searches (e.g., by full file paths or just base names)as_ordered()
handles factors
better; S3
methods removed: as_ordered.ordered()
,
as_ordered.factor()
remove_na()
has better performance when x
has no NA
valuescounts.data.frame()
and props.data.frame()
retain attributes of selected columnstodos()
and fixmes()
will not search for
.R
or .Rmd
files if the path
is
not changed from ""
and no .Rproj
is found
within the directoryunlist0()
to retain original names of lists%names%
for a fun way to set namesfile_open()
as alias for
open_file()
detail()
to return a data.frame
of
details for a vector of columns of a data.frame
squash_vec()
to combined the names of a vector
with repeated valuesmake_sf()
as a simple wrapper for package specific
system.file()
add_file_timestampe()
gains a new parameter
sep
to separate the file name (sans ext) and the time
stampassign_labels.data.frame()
gains new argument
.ls
to explicitly set a list
(or
data.frame
) of columnsprops()
and family gain argument na.rm
to
not count NA
values for proportionspackage_available()
now visibly returns
TRUE
/FALSE
remove_na()
now has methods for list
s and
factor
senvironments()
now has it’s own
print.mark_environments()
method rather than calling
cat()
within the function itselfarray_extract()
’s first argument is changed from
arr
to .arr
diff_time()
now defaults to using UTC (Related to #32)print.note()
method has been updated (Related to: #33):
x
normally, without the
note class
when just the note has to be seennoted
fact()
fact()
now returns a vector with a fact
elementfact.character()
correctly labels NA
s #24fact.factor()
not longer simply returns x
but rather updates the levels and integer values to confirm with other
fact()
methods. fact.factor()
will retain all
levels of the original value, reorder the levels, and append
NA
if necessaryfact.fact()
added to return a correctly formatted
fact()
fact.logical()
now orders levels as TRUE
then FALSE
, and NA
if presentfact.Date()
and fact.POSIXt()
added, which
simply call fact.numeric()
print.fact()
method added to print a fact
vector as a factor
as_ordered.factor()
and
as_ordered.ordered()
now call fact()
to check
levelsis.vector()
directly; arguments passed with attributes that
when removed fulfill is.vector()
are acceptedtodos()
and fixmes()
now correctly show
tags for .Rmd
fileslimit()
sort
argument to props()
pseudo_id.factor()
no longer returns
NA_integer
when a value is NA
or a level is
NA
and correctly resets the order of the levels from the
factor to their order of appearanceflip.data.frame()
no longer coerces single column
data.frames #36fact.pseudo_id()
and pseudo_id.pseudo_id()
methods addedas_ordered()
to quickly create
ordered
factors using fact()
char2fact()
to convert character
vectors (or columns in a data.frame
) to
factors
based on the number unique valuestableNA()
to make a table from NA
valuesround_by()
gains an additional argument
include0
which if FALSE
will replace
0
values with by
assign_labels.data.frame()
gains an additional argument
.missing
to set how to control for missing labels: you can
now use a warning
for a missing label (instead of an error)
or silently ignore any missing labelssort_names()
gains a new argument numeric
to try to sort names of x
by their numeric value #26struct()
, a simplified version of
struct()
fact()
methods
todos()
and fixmes()
gain an additional
argument path
to specify a directory or file to search
within #25print.pseudo_id()
added for a cleaner printbetween_more()
accepts vectors for left
and right
paramsNew name! The previous name jordan
was conflicting with
recent package on CRAN.
...
in todos()
#8
grep()
also now evaluated with cleaned todo
texttodos()
in Rmd files, too#
and spaces in lines
(e.g., # # TODO text
-> text
)counts()
NA
counting in counts()
;
NA
counts are now appended at the end whether or not sort
is calledcounts()
base::rle()
now use a
combination of pseudo_id()
and
base::tabulate()
multi_grepl()
internal functions to prevent
conflicts with R 4.1.0
vector2df()
when passed a
listfact()
and pseudo_id()
fixmes()
#13names_switch()
to switch names and valuesvector2df()
can now output a 1 column data.frame if
name = NULL
invert
parameter to
complete_cases()
to filter for incomplete casesare_identical()
for comparing 2 or more vectors as
identical()
, element-wiseadd_file_timestamp()
diff_time()
and related functions will try to convert
y
to a Date
object if x
is passed
as date (e.g., diff_time_days(Sys.Date(), "2021-06-03")
will not show decimals)stringsAsFactors
option in
quick_df()
note
jordan.note.fun
option for printing – this was
too complicated and doesn’t seem to work too well without too many
adjustmentsnote<-
now appends the class noted
to
the object so that a print.noted
method is dispatched so
the note will be printed when calledprint.note
note defaults to a colorful message
called with cat()
jordanExtra
;
these were a bit wild, dynamic, and not well tested. The
.Rprofile template also exists in the separate
package.match_param()
now reports the value passed to
param
on failurehas_message()
and get_message()
catch()
for catching errors,
messages, and warningshas_*()
now returns the result in the
result
attributeprint.has_catch()
will hide attributes in printtodos()
grep()
todos_df
for viewing
taskstodos()
still has class
data.frame
but will now also have class
todos_df
print.todos_df()
method should be make more sense
for task managementstr_slice_by_word()
no longer has a leading
" "
for each element after the first (this was not the
intention of the split)is_file()
and is_dir()
now returns and
error when passed NULL
or a vector of length 0switch_params()
now accepts a vector for x
...
examples updatedcounts.data.frame()
and
props.data.frame()
print()
method called from todos()
has a
new format to group together multiple items found in a single fileprint_c()
to print a vector into a
c()
“string”diff_time
functions
diff_time()
along with shortcuts for
specific methods: diff_time_secs()
,
diff_time_days()
, diff_time_years()
, and
others (see ?jordan::diff_time
)base::difftime()
but…
diff_time
and numeric
tza
and tzb
parameters)sort_by()
NA
assignments:
NA_at()
for position assignmentsNA_if()
for logical/conditional assignmentsNA_in()
for inclusive matching assignmentsNA_out()
for exclusive matching assignmentsrscript()
, save_source()
, and
source_to_env()
)switch_case()
to return a values based on a left
hand statement returning TRUE
and
switch_in_case()
for evaluating x
%in%
left hand side
dplyr::case_when()
but
for specific casescheckOptions()
recode_by()
and recode_only()
for a
simple implementations of recoding elements in a vectorfizzbuzz()
quick_df()
to turn a list into a data.frame (used
internally, too)complete_cases()
to select rows without
NA
valuesshow_NA
parameter from vector2df()
and list2df()
make.unique()
is utilized for empty name
named to retain the position of the list elementls_object()
to list all is.object()
sls_dataframe()
to list all
is.data.frame()
sls_function()
to list all
is.function()
scounts()
and props()
for counting
unique elements in vectors and data.framesSome exported functions and names have been changed to prevent conflicts with other popular packages
%||%
is no longer exported; it is exported in
rlang
(and reexported in purrr
) and is a
relatively simply function anywaycollapse()
is now collapse0()
to avoid
conflicts with glue
; although glue::collapse()
is meant to be deprecated, collapse0()
is mostly a wrapper
for paste0()
, so this may be a better nameset_names()
is now set_names0()
to avoid
conflicts with rlang
(reexported from purrr
)
and magrittr
do_paste_combine()
(used inside
paste_combine()
) simplified to remove use of
outer()
get_version()
to retrieve the current package
version (assuming you’re in the directory)utils::menu()
is called to confirm that version should
be updatedbump_version()
or by date
bump_date_version()
)string_extract()
function inside str_extract_date()
and
str_extract_datettime()
Major cleanup for documenting, reviewing, removing, relocating, and testing functions.
NEWS.md
file to track changes to the
packagemuffle()
and wuffle()
)limit()
match_param()
now returns correct errors messages for
callswrite_clipboard()
formats vectors as charactersread_clipboard()
tries to correctly format vectors and
data.framesstr_close_enough()
because this didn’t make
much sense anyway%colons%
: A substitute for ::
and
:::
%||%
: Virtually identical to rlang’s
version.CharacterIndex()
: Quick visual of indexes in character
stringsbump_date_version
: Updated DESCRIPTION versions that
are saved as dateschr_split()
: Essentially an alias for
strsplit(., "")[[1]]
get_error()
,
get_warning()
, has_error()
,
has_warning()
, muffle()
and
wuffle()
(aliases for suppressMessages()
and
suppressWarnings()
)is_dir()
,
is_file()
, list_dirs()
is_na_cols()
: previously not exported, inside
select_na_cols()
and remove_na_cols()
limit()
: Limits a numeric vector by an upper and lower
boundmatch_param()
: Alternative to match.arg()
without partial matching and more detailed error messageouter_call()
,
outer_fun()
, within_call()
,
within_fun()
quiet_stop()
: calls stop()
without
throwing an errorset_names()
,
remove_names()
require_namespace()
: Mostly a wrapper for
require()
with a more detailed error messagevap_*()
: Wrappers for vapply()
, must like
purrr’s
map_*jordanExtra
Some miscellaneous, less controlled functions have been moved to jordanExtra.
set_rust_engine()
,
engine_rust()
add_data_sheet()
, add_image_sheet()
pROC_optimal_threshold()
,
pROC_quick_plot()
cohen2odds()
, cohend2r()
,
odds_ratio()
, odds2d()
, odds2r()
,
r2cohend()
fishers_method()
,
iqrs()
, p_round()
, p_value_sig()
,
percentile_rank()
, proportion()
,
sd_pooled()
, sterr()
,
tukey_coef()
, z_score()
add_euclidean()
,
add_malahanobis()
, %=+
,
filter_combine()
, reverse_log_trans()
,