Tomas' personal mix of utilities
Mix of things that I missed in R. Matlab-like colon operator, stem plot (base plotting system), round2 with order, ifft etc.
seqM
Matlab-like behaviour of colon operator or linspace for creating sequences, for-loop friendly.
round2
Rounds a number to the specified order. Round half away from zero (this is the difference from built-in round
function.)
ifft
Inverse Fast Fourier Transform (discrete FT), Matlab-like behavior.
Stem
Matlab-like stem plotting function for discrete series.
isInt
Returns TRUE / FALSE whether it is exactly 1 integer number (in fact, the class can be numeric but the number must be integer), non-missing
isNum
Returns TRUE / FALSE whether it is exactly 1 number (numeric or integer vector of length 1, non-missing)
isString
Returns TRUE / FALSE whether it is exactly 1 character string (character vector of length 1, non-missing)
isLogical
Returns TRUE / FALSE whether it is exactly 1 logical value (TRUE or FALSE), non-missing
strTrim
Trim leading and trailing whitespace in character string. Way faster than str_trim() or trimws().
str_contains
Find string in another string (without regular expressions), returns TRUE / FALSE.
str_find
Find string in another string (without regular expressions), returns indices of all occurences.
str_find1
Find string in another string (without regular expressions), returns indices of the first occurence only.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.