-
substantial changes to conditions
- all conditions previously created with
fuj::new_condition()have been rewritten withcnd::condition()[#259] - all of these condition now use different class names, generated through
cnd::condition() - for more information, see https://jmbarbone.github.io/cnd
- FIXME: ensure names:
{rd_name}_{thing}-- and see about switching messages around: (message = function(type, params))
- all conditions previously created with
-
the following arguments were deprecated and unused, and have now been removed completely:
list2df(show_NA)vector2df(show_NA)t_df(id)
-
merge_list(sort)included to toggle name sorting in result -
make_sf()now usessubstitute()to provide more information inside the function body when viewing #129 -
round_to()added to round values to a set #142 -
is_true(),is_false()now works as documented #262 -
to_boolean()now works as documented #262to_boolean.character(), andto_boolean.factor()have been improved; they will also now require exact matches; cleanup (e.g., trimming whitespace and lowercasing) are not longer performedto_boolean.integer()addedto_boolean.numeric(),to_boolean.integer()will now returnNA
-
md5(bytes)added to usetools::md5sum(bytpes)for R > 4.2.0 #258 -
md5()now uses little-endian serialization (i.e.,serialize(xdr = FALSE)) for more consistent results across platforms and faster speed; which may cause hashes created prior to change -
{mark}'s title has been updated -
write_file_md5(method = "feather"),write_file_md5(method = "parquet")now use{feather}and{nanoparquet}, respectively, rather than{arrow}#245 -
read_clipboard("md")no longer needs{readMdTable} -
read_clibpboard()will always return atibbleif{tibble}is available (this can be turned off ifoptions(mark.tibble = FALSE))
file_copy_md5()now produces more messages #239file_copy_md5()saves md5 sum checks as an attribute- removes tests for
struct()#252
read_clipboard()andwrite_clipboard()now use{clipr}to work on non-Windows platforms #125read_clipboard()now works with more methods for readingdata.framesread_clipboard()now defaults to atibblereturn when{tibble}is available- timezone testing updated #247
- actions updated
write_file_md5()now supports"feather"and"parquet"methods as wrappers for{arrow}#234md5()added to provide MD5 check sums for objects #233unique_rows()added to subset on (non-)duplicated rows in adata.frame#87within()added as an alternative tobetween_more()#120- test updated for upcoming R release #240
echo()is now removed; useecho::echo()instead #214- includes
tryn()for running an expression a maximum number of times before failure #80
unlist0()no longer fails when input list is not named #220
match_param()has been improved
file_copy_md5()added as a wrapper forfs::file_copy()but provides MD5 checks throughtools::md5sum()to avoid overwriting files that had no content changes #207write_file_md5()added as a general writing function and utilizesfile_copy_md5()for MD5 checks (including some compression options) #207, #224
merge_list()added for combining lists #200glob()added for basic wildcard globbing on character vectors #167- adds greater use of
{fs}over base file functions #160 - improvements in
todos()andfixmes() - adds more use of
rlang::list2()for internally #199 - GitHub action included to check version updates with pull requests #211
%::%and%:::%now exported from{fuj}
- updates Timezone references for upcoming R release #203
- new functions for detecting blank values in a vector or
data.frame. Blank values are those which do not contain any text (controls forNA) or are entirely white space.is_blank()for detecting blank values in a vectoris_blank_cols()for detecting blank columnsselect_blank_cols()for selecting blank columnsremove_blank_cols()for removing blank columns
match_param()now accepts a named listed for alias matching #104echo()evaluates expressions and logs outputs #164{fuj}is now imported- multiple functions now re-exported from
{fuj}(see?mark::reexports) set_names0()is deprecated in favor ofset_names()- error messages are created with
fuj::new_condition(); - test for errors and warnings enhanced with class checks
- multiple functions now re-exported from
date_from_partial()works again #155 after fixing an issue with an internal utilityis_valid_date_string()that wasn't recognizing%Y-%m-%d(and potentially others)lintrGitHub action updated #173; this includes plenty of internal improvements and code cleanup- package description in help files corrected #165
- GitHub pages updated with latest
{pkgdown}action #175 - Update to GitHub R-CMD-check action #178
switch_in_case()handlesNAs better #183- internal
switchtests updated for{waldo}development #182 thanks,@hadley - methods for
write_clipboard()are now displayed in documentation #186
- CRAN fix for new release #151
normalize()added to normalize values invectors,matrices, anddata.frames by specified ranges and boundaries #143get_labels()and other label related functions now get exact matches for"label"attributes #141recode_only(), andrecode_by()now accept a namedlist()forby#96]switch_in_case()now handles functions in the right hand statementsupdate_version()now correctly checks result of embeddedutils::menu()call for updating the version #123require_namespace()now accepts multiple namespaces #121unique.fact()S3 method #86recode_only()andrecode_by()can accept a single value forval#73fact_reverse()for reversingfactlevels #78as.Date.fact()added #108as.character.fact()added[.factaddedread_bib()better handles fields where=is present in the text #117
fact.haven_labelled()works properly and retains thelabelattribute #136drop_levels()is exported #105recode_by()andrecode_only()handle factors better #81- Functions that made use of
shell.exec()now try to determine the appropriate method of opening a file base on OS. #126 - Internal functions for potentially coercing factor levels into dates no longer try to check for
"%Z"in the date format #147
reverse()has been removed (useflip()instead)assign_label()has been removed (useassign_labels()instead)percentile_rank(times)is deprecated in favor ofpercent_rank(weights)
print.fact()rewritten as a slightly modifiedprint.factor()#109percentile_rank()improvements #131
- Fix for CRAN check #128
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 whenxhas onlyNAvalues) no longer throws a warning and returnsNAformin_c,max_c#59print.noted()now passes...to next methods #67- corrects deprecation warning in
assign_label()#74assign_label()will be removed in0.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 whenxis a decimal by checking for unique values first #92counts.data.frame()now handle factor columns better
- Functions in
?handlers, all allow for additional params passed through...#34 - adds
row_bind()to bind a list ofdata.frames()#46 - adds
drop_levels()withfactoranddata.framemethods; functions similarly tobase::droplevels()but is a little faster #54 todos()andfixmes()gain a new paramforce- When
TRUE, forces searches for.Rfiles when the given directory does not contain an.Rprojfile - When
FALSE, prevents long start ups when these functions are called in a.Rprofilefile and R is not launches in a project directory - This be toggled with a new options
mark.todos.force
- When
- adds
set_note(), a wrapper fornote<-()#77 - adds
fact2char()to complimentchar2fact()#75 print.pseudo_id()now truncates long uniques to a single line #70match_param(NULL, null = TRUE)allowsparamto safely returnNULL#89fact_na()is added to usefactvectors withNAlevels that work withis.na()#69 and otherNAhandling improvements- adds a new
print._mark_bib_df()method to supporting printing lists - adds new methods for
facts:as.integer.fact(),as.double.fact(),remove_na.fact()
fact.numeric()now treatsNaNthe same asNA, no extra level/unique value is retainedread_clipboard()now returnsNAwhen the clipboard is empty, rather than""(improvements with internal type conversions)- improvements to
NAhandling as well
- github actions updated
- internal type conversion now heavily relies on
utils::type.convert()with some additional functionality for logical (e.g., character string using"true"and"false") and for guessing dates in aYYYY-MM-DDformat - general clean up and formatting
details(factor)no longer addsfactclass tofactors#50details()gains new argumentfactor_nto 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...whenlength(...) > 2#52
- adds
percentile_rank()to calculate percentile ranks with a vector - adds
insert()to insert multiple values into a vector pseudo_id()gains argumentna_lastto change positioning ofNAvaluesis_true()andis_false()are now exported as generics with methods fordefaultandlogical- adds
omit_na()for tracking positions ofNAand non-NAvalues quick_df(NULL)now returns an emptydata.framequick_dfl()exported as a wrapper forquick_df(list(...))
squash_vec()now works correctly when values are not ordered #43as_ordered()no longer duplicatesorderedclass #44counts.data.frame()andprops.data.frame()correctly make column names unique- internal
try_numeric()correctly handlesNAs flip.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(), andls_all()have improvements for environmental searchingassign_labels.data.frame(.missing = "warning")correctly removes missing columnsremove_na.factor()no long drops additional classes other thanorderedandfactor
- documentation of
struct()overwriting attributes improved and examples - adds more unit tests
fact.haven_labelled()now returns an object with classfact#39; performance enhancementsset_names0(NULL)no longer causes an error and returnsNULL#40diff_time()correctly handles time zones whenxisDateandyisPOSIXt#41
- updates file path finding functions (e.g.,
list_files()) to try to not search every file depending on desired searches (e.g., by full file paths or just base names) as_ordered()handlesfactorsbetter; S3 methods removed:as_ordered.ordered(),as_ordered.factor()remove_na()has better performance whenxhas noNAvaluescounts.data.frame()andprops.data.frame()retain attributes of selected columnstodos()andfixmes()will not search for.Ror.Rmdfiles if thepathis not changed from""and no.Rprojis found within the directory
- adds
unlist0()to retain original names of lists - adds
%names%for a fun way to set names - adds
file_open()as alias foropen_file() - adds
detail()to return adata.frameof details for a vector of columns of adata.frame - adds
squash_vec()to combined the names of a vector with repeated values - adds
make_sf()as a simple wrapper for package specificsystem.file() add_file_timestampe()gains a new parametersepto separate the file name (sans ext) and the time stampassign_labels.data.frame()gains new argument.lsto explicitly set alist(ordata.frame) of columnsprops()and family gain argumentna.rmto not countNAvalues for proportions
package_available()now visibly returnsTRUE/FALSEremove_na()now has methods forlists andfactorsenvironments()now has it's ownprint.mark_environments()method rather than callingcat()within the function itselfarray_extract()'s first argument is changed fromarrto.arrdiff_time()now defaults to using UTC (Related to #32)print.note()method has been updated (Related to: #33):- to print
xnormally, without thenote classwhen just the note has to be seen - an internal function now handles the note formatted for class
noted
- to print
- changes to
fact()fact()now returns a vector with afactelementfact.character()correctly labelsNAs #24fact.factor()not longer simply returnsxbut rather updates the levels and integer values to confirm with otherfact()methods.fact.factor()will retain all levels of the original value, reorder the levels, and appendNAif necessaryfact.fact()added to return a correctly formattedfact()fact.logical()now orders levels asTRUEthenFALSE, andNAif presentfact.Date()andfact.POSIXt()added, which simply callfact.numeric()print.fact()method added to print afactvector as afactoras_ordered.factor()andas_ordered.ordered()now callfact()to check levels
- functions that check if an argument is a vector no long use
is.vector()directly; arguments passed with attributes that when removed fulfillis.vector()are accepted todos()andfixmes()now correctly show tags for.Rmdfiles- correction to error message in
limit() - adds missing
sortargument toprops() pseudo_id.factor()no longer returnsNA_integerwhen a value isNAor a level isNAand correctly resets the order of the levels from the factor to their order of appearanceflip.data.frame()no longer coerces single column data.frames #36
fact.pseudo_id()andpseudo_id.pseudo_id()methods added- adds
as_ordered()to quickly createorderedfactors usingfact() - adds
char2fact()to convertcharactervectors (or columns in adata.frame) tofactorsbased on the number unique values - adds
tableNA()to make a table fromNAvalues round_by()gains an additional argumentinclude0which ifFALSEwill replace0values withbyassign_labels.data.frame()gains an additional argument.missingto set how to control for missing labels: you can now use awarningfor a missing label (instead of an error) or silently ignore any missing labelssort_names()gains a new argumentnumericto try to sort names ofxby their numeric value #26- adds
struct(), a simplified version ofstruct() - adds more
fact()methods todos()andfixmes()gain an additional argumentpathto specify a directory or file to search within #25print.pseudo_id()added for a cleaner printbetween_more()accepts vectors forleftandrightparams
- code coverage added
- additional tests added
- no visible user changes
- removes temporarily created files #22
New name!
The previous name jordan was conflicting with recent package on CRAN.
- corrects use of
...intodos()#8grep()also now evaluated with cleaned todo text- searches for
todos()in Rmd files, too - correctly removes additional
#and spaces in lines (e.g.,# # TODO text->text)
- updates for
counts()- corrects
NAcounting incounts();NAcounts are now appended at the end whether or not sort is called - other optimization for
counts() - core functions previously on
base::rle()now use a combination ofpseudo_id()andbase::tabulate() - corrects counts for factor data when higher levels are not present #16
- corrects
- update to
multi_grepl()internal functions to prevent conflicts withR 4.1.0 - corrects error message in
vector2df()when passed a list
- adds/exports
fact()andpseudo_id() - adds
fixmes()#13 - adds
names_switch()to switch names and values vector2df()can now output a 1 column data.frame ifname = NULL- adds an
invertparameter tocomplete_cases()to filter for incomplete cases - adds
are_identical()for comparing 2 or more vectors asidentical(), element-wise - adds
add_file_timestamp() diff_time()and related functions will try to convertyto aDateobject ifxis passed as date (e.g.,diff_time_days(Sys.Date(), "2021-06-03")will not show decimals)
- removes checks for
stringsAsFactorsoption inquick_df() - improves functionality of
note- removes
jordan.note.funoption for printing -- this was too complicated and doesn't seem to work too well without too many adjustments note<-now appends the classnotedto the object so that aprint.notedmethod is dispatched so the note will be printed when calledprint.notenote defaults to a colorful message called withcat()- Startup related functions moved to
jordanExtra; these were a bit wild, dynamic, and not well tested. The .Rprofile template also exists in the separate package.
- removes
match_param()now reports the value passed toparamon failure- improvements to handlers
- adds
has_message()andget_message() - internal rework of
catch()for catching errors, messages, and warnings has_*()now returns the result in theresultattributeprint.has_catch()will hide attributes in print
- adds
- improvements/updates to
todos()- allows text filtering by passing arguments to
grep() - adds new print method for
todos_dffor viewing tasks - the result of
todos()still has classdata.framebut will now also have classtodos_df - the
print.todos_df()method should be make more sense for task management
- allows text filtering by passing arguments to
str_slice_by_word()no longer has a leading" "for each element after the first (this was not the intention of the split)is_file()andis_dir()now returns and error when passedNULLor a vector of length 0switch_params()now accepts a vector forx...examples updated
- adds param to change default column name from
counts.data.frame()andprops.data.frame() print()method called fromtodos()has a new format to group together multiple items found in a single file
- adds
print_c()to print a vector into ac()"string" - adds
diff_timefunctions- functions include
diff_time()along with shortcuts for specific methods:diff_time_secs(),diff_time_days(),diff_time_years(), and others (see?jordan::diff_time) - these are much like the
base::difftime()but...- have more methods/units for computing differences, which may need to be the case for when a unit of time has to be standardized (e.g., 1 year needs to be 365 days, or 1 month needs to be 30 days)
- are class
diff_timeandnumeric - have a slightly different print method (will note appropriately how units of time are measures)
- can account for timezone differences (must be set with a the
tzaandtzbparameters)
- functions include
- adds
sort_by() - adds
NAassignments:NA_at()for position assignmentsNA_if()for logical/conditional assignmentsNA_in()for inclusive matching assignmentsNA_out()for exclusive matching assignments
- adds functions for sourcing scripts into environments for later use (
rscript(),save_source(), andsource_to_env()) - adds
switch_case()to return a values based on a left hand statement returningTRUEandswitch_in_case()for evaluatingx%in%left hand side- these functions are much like
dplyr::case_when()but for specific cases - adds function
checkOptions()
- these functions are much like
- adds
recode_by()andrecode_only()for a simple implementations of recoding elements in a vector
- adds
fizzbuzz() - adds data.frame functions
- adds
quick_df()to turn a list into a data.frame (used internally, too) - adds
complete_cases()to select rows withoutNAvalues - removes
show_NAparameter fromvector2df()andlist2df()- for vectors this will now produce an NA value for the first column
- for lists
make.unique()is utilized for empty name named to retain the position of the list element
- adds
- adds listing wrapper:
ls_object()to list allis.object()sls_dataframe()to list allis.data.frame()sls_function()to list allis.function()s
- adds
counts()andprops()for counting unique elements in vectors and data.frames
Some exported functions and names have been changed to prevent conflicts with other popular packages
%||%is no longer exported; it is exported inrlang(and reexported inpurrr) and is a relatively simply function anywaycollapse()is nowcollapse0()to avoid conflicts withglue; althoughglue::collapse()is meant to be deprecated,collapse0()is mostly a wrapper forpaste0(), so this may be a better nameset_names()is nowset_names0()to avoid conflicts withrlang(reexported frompurrr) andmagrittr
do_paste_combine()(used insidepaste_combine()) simplified to remove use ofouter()- improves version bumping/updating
- added
get_version()to retrieve the current package version (assuming you're in the directory) utils::menu()is called to confirm that version should be updated- can update by either adding a number to the version (
bump_version()or by datebump_date_version())
- added
- implements an improved non-exported
string_extract()function insidestr_extract_date()andstr_extract_datettime()
Major cleanup for documenting, reviewing, removing, relocating, and testing functions.
- Added a
NEWS.mdfile to track changes to the package - Files renamed and reorganized
- Various tests included
- Added aliases to muffle messages and warnings (
muffle()andwuffle()) - Added
limit() match_param()now returns correct errors messages for callswrite_clipboard()formats vectors as charactersread_clipboard()tries to correctly format vectors and data.frames- removed
str_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 forstrsplit(., "")[[1]]- Error and warning handlers:
get_error(),get_warning(),has_error(),has_warning(),muffle()andwuffle()(aliases forsuppressMessages()andsuppressWarnings()) - File/directory utilities:
is_dir(),is_file(),list_dirs() is_na_cols(): previously not exported, insideselect_na_cols()andremove_na_cols()limit(): Limits a numeric vector by an upper and lower boundmatch_param(): Alternative tomatch.arg()without partial matching and more detailed error message- Functions for calls:
outer_call(),outer_fun(),within_call(),within_fun() quiet_stop(): callsstop()without throwing an error- Functions for names:
set_names(),remove_names() require_namespace(): Mostly a wrapper forrequire()with a more detailed error messagevap_*(): Wrappers forvapply(), must like purrr's map_*
Some miscellaneous, less controlled functions have been moved to jordanExtra.
- Functions for Rust
set_rust_engine(),engine_rust() - Functions for openxlsx:
add_data_sheet(),add_image_sheet() - Functions for pROC:
pROC_optimal_threshold(),pROC_quick_plot() - Effect sizes:
cohen2odds(),cohend2r(),odds_ratio(),odds2d(),odds2r(),r2cohend() - Statistical functions:
fishers_method(),iqrs(),p_round(),p_value_sig(),percentile_rank(),proportion(),sd_pooled(),sterr(),tukey_coef(),z_score() - Others:
add_euclidean(),add_malahanobis(),%=+,filter_combine(),reverse_log_trans(),
- Initial commits of functions
- Quite a mess with no versions