Man pages for jorritvm/jrutils
utility functions for R

bottomleftprints the bottomleft corner of a 2D array (matrix,...
bottomrightprints the bottomright corner of a 2D array (matrix,...
catnutility function to cat undefined number of arguments and end...
check_csv_regionidentifies the local csv type used in the provided file
clcclear the R console in RSTUDIO
clean_pathnoramlize path (get rid of ..) but default to forward slash
clear'clear' will clear the global environment or, when specified,...
clearplotscloses any open plots in the RStudio viewer pane
clip_pathreplaces backslashes with forward slashes in a path on the...
combine_pathutility function to combine pieces of a path into a nice...
convert_csv_regional_styleconvert a CSV from one regional style to another
convert_datetime_to_timeidprovided a vector of string dates in the standard year 2018...
csv_to_vectorsplits a comma separated character string into a character...
distribute_vector_over_matrixdistributes per row each element of m_distribute over the...
docvarcats a string representation of a variable's structure, and...
excel_cell_to_RCconvert an excel cell reference to a list of row and number...
file_backupwill create a backup of a file where the file is suffixed...
fill_A_NA_with_Bfill NA in vector A with values from vector B
fractionalisereturns a vector where every element is replaced by its...
get_native_list_separatorreturn the list separator character as set up in your system...
get_season_from_datereturns the season string for a given date
get_session_typeProvides information about the type of sessions we are...
init_project_foldergiven that the workdir is project/src this will create...
insert_at_elementinsert a vector of elements in a vector before or after a...
letters_to_numbersconvert excel letter column reference to numeric
lines_of_code_per_filecount lines of code in R & python files in your project
list_code_filesreturns a character vector of absolute code file paths
list_of_vectors_to_dtcreates a new data.table where every list element which is a...
load_packages_robustlyTest whether the provided vector of package is installed on...
locshortcut for list_code_file and count_lines_of_code that...
merge_lists_by_keymerge 2 lists of lists together by common key
merge_overwritemerge a data.table x and y (left join) and overwrite the...
move_data_columns_rightrearrange the data.table columns in place so index columns...
named_listcreate a list where for each element the name of the variable...
nearest_poslooks for the value closest to the provided values, in a...
nearest_vallooks for the value closest to the provided values, in a...
numeric_date_to_iso8601converts a numeric date (e.g. when reading an excel file) to...
print_globalenv_sizereturns the size of the global workspace in a human readable...
print_var_sizereturns the size of a single variable in a human readable...
ptcreate a progress string like "(5/10)"
remove_all_spec_charremoves all non alphanumerical characters except - and _ from...
remove_tail_naremoves tail rows that contain NA values, up until the last...
remove_win_reserved_charremoves characters from a string that are removed in the...
rescalerescale a numerical vector using a new total sum value
robust_freadfread should be able to auto detect CSV seperator, this...
string_gently_to_booleanconverts a string to a boolean if it holds true or false, but...
string_gently_to_numericconverts a string to a numeric if it holds a number, but...
str_leftshow leftmost x characters from string s
str_rightshow rightmost x characters from string sTitle
tikutility function to cat undefined number of arguments and end...
tokalias for toc() to be more in line with overloaded function...
topleftprints the topleft corner of a 2D array (matrix, data.frame,...
toprightprints the topright corner of a 2D array (matrix, data.frame,...
tstampreturn a string timestamp in ISO8601 using the provided...
tstampnumversion of tstamp without any special characters (only...
two_column_csv_to_listparses a 2 column csv file into a list, usefull for options...
two_column_xlsx_to_listparses a 2 column xlsx file into a list, usefull for options...
update_jrutils_packagerun this to update the sma_r_utils package from a source...
vector_to_csvreturns a character vector as a comma seperated string
wopenutility function to open path in windows explorer
write_table_to_clipboardshortcut to put your matrix, data.frame or data.table on your...
wtfopen a data.frame in excel
wtxopen data.frame in temporary excel file
jorritvm/jrutils documentation built on Feb. 14, 2023, 11:33 p.m.