Learn R Programming

FastUtils (version 0.2.1)

Fast, Readable Utility Functions

Description

A wide variety of tools for general data analysis, wrangling, spelling, statistics, visualizations, package development, and more. All functions have vectorized implementations whenever possible. Exported names are designed to be readable, with longer names possessing short aliases.

Copy Link

Version

Install

install.packages('FastUtils')

Monthly Downloads

198

Version

0.2.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Qile Yang

Last Published

August 17th, 2024

Functions in FastUtils (0.2.1)

encloseBr

Enclose String with Brackets
initTestthat

Initialize Testthat Files
initV

Initialize a Vector
enumerateit

Enumerate Elements with Indices
isPascalCase

Check if String is PascalCase
createPkgLoader

Create Package Loader Function
FastUtils-package

FastUtils: Fast, Readable Utility Functions
add

Add Two Objects
bound

Bound a Number within a Range
closestWord

Find the Closest Word in a Set to a Given Word
getChar

Get a Character at a Specific Index
getUniquePairsUpTo

Generate Unique Pairs Up To a Number
fixColnames

Fix Column Names
isSnakeCase

Check if String is snake_case
getfirst

Get the First Elements of a Vector or List
isVowel

Check if a Character is a Vowel
getPkgKeywords

Get Keywords from R Package Documentation
getPlotDims

Get the dimensions of a ggplot Object
removeVdiffrNewSnapShots

Remove New Snapshots from vdiffr Tests
getFailStr

Get Failure Message as a character
initEmptyTable

Initialize an Empty Table
getAvgHex

Compute the Average of Hex Colors
ind

Get Index from Enumerated Element
initDataFrameWithColnames

Initialize a DataFrame with Column Names
enclose

Enclose String with Specified Characters
joinRegex

Join regex expressions by union
greplDir

Search for a Pattern in Files within a Directory
isBound

Check if a Number is within a Range
getlast

Get the Last Elements of a Vector or List
rmByName

Remove Elements with Specified Name Regex
isCamelCase

Check if String is camelCase
prependIndefArticle

Prepend an Indefinite Article to a String
setRownames

Set Row Names
evalText

evaluates a string as R code, and stops if an error occurs
findMissingRdSections

Find Missing Sections in Rd Files
isEven

Check if a Number is Even
splitCamel

Split CamelCase or PascalCase Strings
trySplitWords

Try to Split Words Based on Naming Convention
val

Get Value from Enumerated Element by Index
rownamesToCol

Convert Row Names to a Column
initList

Initialize a List
multiply

Multiply Two Numbers
listFiles

List Only Files in a Directory
quietly

Suppress Messages and Output
isOdd

Check if a Number is Odd
setColnames

Set Column Names
setNames

Set Names of an Object
splitSnake

Split Snake Case String
startsWithVowel

Check if a String Starts with a Vowel
mutateToRownames

Mutate columns to Row Names
zipit

Zip Multiple Vectors or Lists
warningp

Custom Warning Function Without Call
scaleHex

Scale the Brightness of a Hex Color
stopp

Custom Stop Function Without Call
namedNumericToTable

Convert Named Numeric Vector to Table
tableToNumeric

Convert a Table to Numeric
test_quietly_that

Run a Testthat test Quietly
substrEnd

Extract Substring from Start to End Difference
subtract

Subtract Two Numbers
val1

Get First Value from Enumerated Element
validateObject

Validate Object
stripSpaces

Remove Spaces from a String
colToRownames

Convert a Column to Row Names
createHash

Create a Hash Table
createMutator

Create a Mutator Function
divide

Divide Two Numbers