String Functions
|
appendSuffix()
|
Append Suffix to (Selected) Character Values |
collapsed()
|
Shortcut to paste(x, collapse = collapse) |
commaCollapsed()
|
Paste With Collapse = "," |
defaultLevels()
|
Default Factor Levels |
extractSubstring()
|
Extract Substrings Defined by Regular Expressions |
frenchToAscii()
|
French Unicode Letter to ASCII Letter(s) |
hsCountInStr()
|
Count Pattern in String |
hsQuoteChr()
|
Quote Character Strings |
hsSafeName()
|
Non-existing desired name |
hsSubstSpecChars()
|
Substitution of Special Characters |
hsTrim()
|
Remove Leading and Trailing Spaces |
moveToFront()
|
Move elements to the start of a vector |
multiSubstitute()
|
Multiple Substitutions |
pairwise()
|
Reorder Strings So That Matching Strings are Neighbours |
removeExtension()
|
Remove File Name Extension |
removeSpaces()
|
Remove all Spaces in String(s) |
shorten()
|
Shorten Strings to a Maximum Length |
stringContains()
|
stringContains |
stringEndsWith()
|
stringEndsWith |
stringList()
|
String of Comma Separated Quoted Strings |
stringStartsWith()
|
stringStartsWith |
stringToExpression()
|
Convert String to Expression |
subExpressionMatches()
|
Find and Extract Regular Expressions from Strings |
|
catAndRun()
|
Print Debug Messages Before and After Running Code |
catLines()
|
Print Character Vector to the Console |
catNewLineIf()
|
Print New Line Character to the Console if Condition is Met |
clearConsole()
|
Clear the R Console |
columnDescriptor()
|
Column Descriptor |
finishAndShowPdf()
|
Close Device and Open PDF File in Viewer |
guessSeparator()
|
Guess Column Separator Used in File |
headtail()
|
Print First and Last Rows of a Data Frame |
hsPrepPdf()
|
Prepare Writing of PDF File |
preparePdf()
|
Open PDF Device with DIN A4 Dimensions by Default |
readArglists()
|
Read Argument Lists from CSV File |
readCsvInputFile()
|
Read CSV File |
readPackageFile()
|
Read File from Package's extdata Folder |
setLoaded()
|
Set the "loaded" Status for a Script |
sourceScripts()
|
Load R Scripts with source |
writeText()
|
Write Text Lines to a File |
Functions Working on Data Frames
|
addRowWithName()
|
Add a Row with a Name |
addSuffixToColumns()
|
Add Suffix to Column Names |
asNoFactorDataFrame()
|
Convert to Data Frame without Factors |
columnToDate()
|
Convert Column in Data Frame To Date |
columnwisePercentage()
|
Columnwise Percentage |
dropUnusedFactorLevels()
|
Drop Unused Factor Levels in all Factor Columns |
extractRowRanges()
|
Extract Row Ranges by Pattern |
fullySorted()
|
Sort a Data Frame by all of its Columns |
firstPosixColumn()
|
data/time column of data frame |
getKeywordPositions()
|
Localise Keywords in Data Frame |
hsAddMissingCols()
|
Add missing Columns to a Data Frame |
hsDelEmptyCols()
|
Delete empty Columns of Data Frame |
hsRenameColumns()
|
Rename Columns in a Data Frame (deprecated) |
insertColumns()
|
Insert new Column(s) into a Data Frame |
mergeAll()
|
Merge Multiple Data Frames |
moveColumnsToFront()
|
Move Columns to the Start of a Data Frame |
noFactorDataFrame()
|
Create Data Frame without Factors |
pasteColumns()
|
Paste Columns of Data Frame With Separator |
pasteColumns0()
|
Paste Columns of Data Frame Without Separator |
posixColumnAtPosition()
|
Indices of POSIX columns in a Data Frame |
rbindAll()
|
rbind all data frames given in a list |
removeColumns()
|
Remove Columns from a Data Frame |
removeEmptyColumns()
|
Remove empty Columns from a Data Frame |
renameAndSelect()
|
Rename and Select Columns of a Data Frame |
renameColumns()
|
Rename Columns in a Data Frame |
resetRowNames()
|
Reset row names to 1:n |
roundColumns()
|
Round Columns to given Number of Digits |
rowwisePercentage()
|
Rowwise Percentage |
safeColumnBind()
|
"Safe" version of cbind. |
safeMerge()
|
Merge By Checking Column Existence |
safeRowBind()
|
"safe" rbind |
safeRowBindAll()
|
"safe" rbind of all data frames in a list |
selectColumns()
|
Select Columns from a Data Frame |
setColumns()
|
Set the column(s) of a data frame |
splitIntoFixSizedBlocks()
|
Split into blocks of same size |
tableLookup()
|
Lookup Value for Key in Table |
unmerge()
|
Invert the Merging of two Data Frames |
Conversion Functions
|
asColumnList()
|
Matrix to List of Matrix Columns |
asRowList()
|
Matrix to List of Matrix Rows |
convertCsvFile()
|
Modify the format of a CSV file |
csvTextToDataFrame()
|
CSV Text to Data Frame |
hsChrToNum()
|
Character to Numeric |
hsStringToDate()
|
Convert String to Date |
hsStringToDouble()
|
Convert String to Double |
hsMatrixToListForm()
|
Convert "Matrix Form" (wide format) to "List Form" (long format) |
naToLastNonNa()
|
Replace NA With "Last" non-NA |
startsToEnds()
|
Helper Function: Start Indices to End Indices |
startsToRanges()
|
Row Numbers of Start Rows to From/To Row Ranges |
toFactor()
|
Convert to Factor with unique Values as Levels |
toFormula()
|
Create Formula from Left and Right Term Strings |
toInches()
|
Convert Centimeters to Inches |
toKeysAndValues()
|
Key Value String to List of Keys and Values |
toLookupClass()
|
Keys and Values to Lookup Structure |
toLookupList()
|
Keys and Values to Lookup List |
toLookupTable()
|
Keys and Values or List to Lookup Table |
toNamedList()
|
Convert to List with Names Equal to List Elements |
toPositiveIndices()
|
Negative Indices to Positive Indices |
underscoreToPercent()
|
Replace underscore with percent sign |
Operating System Functions
|
cmdLinePath()
|
Path in Quotes for Usage in Command Line |
copyDirectoryStructure()
|
Copy Directory Structure |
createDirAndReturnPath()
|
Create a Directory including required "upward" Folders |
createDirectory()
|
Create Directory if it does not exist |
defaultWindowsProgramFolders()
|
Default Windows Program Folders |
desktop()
|
Path to Your Desktop |
fileExtension()
|
Get Extension of Full File Paths |
get_homedir()
|
Get File Path of User's Home Directory |
hsOpenWindowsExplorer()
|
Open Windows Explorer |
hsShell()
|
Wrapper around "shell" |
hsShowPdf()
|
Open PDF file in PDF viewer |
hsSystem()
|
Wrapper around "system" |
mySystemTime()
|
Elapsed Time of a Function Call |
objectSize()
|
Object Size and Sizes of Sub Structures in Mb |
rStylePath()
|
R compatible file path |
runBatchfileInDirectory()
|
Run a Batch File in a given Directory |
runInDirectory()
|
Change Working Directory and Run Function |
safePath()
|
Stop if Path does not Exist |
tempSubdirectory()
|
Create and Return Path of Subdirectory in temp() |
user()
|
Name of the Current User |
windowsPath()
|
convert to MS Windows-compatible path |