BBmisc: Miscellaneous Helper Functions for B. Bischl

Miscellaneous helper functions for and from B. Bischl and some other guys, mainly for package development.

Install the latest version of this package by entering the following in R:
AuthorBernd Bischl [aut, cre], Michel Lang [aut], Jakob Bossek [aut], Daniel Horn [aut], Jakob Richter [aut], Dirk Surmann [aut]
Date of publication2017-03-10 00:20:46
MaintainerBernd Bischl <>
LicenseBSD_2_clause + file LICENSE

View on CRAN

Man pages

addClasses: A wrapper to add to the class attribute.

argsAsNamedList: Parses '...' arguments to a named list.

asMatrixCols: Extracts a named element from a list of lists.

asQuoted: Converts a string into a quoted expression.

binPack: Simple bin packing.

btwn: Check if some values are covered by the range of the values...

capitalizeStrings: Capitalize strings in a vector

catf: Wrapper for cat and sprintf.

cFactor: Combine multiple factors and return a factor.

checkArg: Check for a function argument.

checkListElementClass: Check that a list contains only elements of a required type.

chunk: Chunk elements of vectors into blocks of nearly equal size.

clipString: Shortens strings to a given length.

coalesce: Returns first non-missing, non-null argument.

collapse: Collapse vector to string.

collapsef: Collapse vector to string.

computeMode: Compute statistical mode of a vector (value that occurs most...

convertDataFrameCols: Converts columns in a data frame to characters, factors or...

convertInteger: Conversion for single integer.

convertIntegers: Conversion for integer vector.

convertListOfRowsToDataFrame: Convert a list of row-vector of equal structure to a...

convertMatrixType: Converts storage type of a matrix.

convertRowsToList: Convert rows (columns) of data.frame or matrix to lists.

convertToShortString: Converts any R object to a descriptive string so it can be...

dapply: Call 'lapply' on an object and return a data.frame.

deprecated: Deprecated function. Do not use!

do.call2: Execute a function call similar to ''.

dropNamed: Drop named elements of an object.

ensureVector: Blow up single scalars / objects to vectors / list by...

explode: Split up a string into substrings.

extractSubList: Extracts a named element from a list of lists.

filterNull: Filter a list for NULL values

getAttributeNames: Helper function for determining the vector of attribute names...

getClass1: Wrapper for 'class(x)[1]'.

getFirst: Get the first/last element of a list/vector.

getMaxIndex: Return index of maximal/minimal/best element in numerical...

getMaxIndexOfRows: Find row- or columnwise the index of the maximal / minimal...

getOperatingSystem: Functions to determine the operating system.

getRelativePath: Construct a path relative to another

getUnixTime: Current time in seconds.

getUsedFactorLevels: Determines used factor levels.

hasAttributes: Check if given object has certain attributes.

insert: Insert elements from one list/vector into another...

isDirectory: Is one / are several files a directory?

isEmptyDirectory: Is one / are several directories empty?

is.error: Is return value of try an exception?

isExpensiveExampleOk: Conditional checking for expensive examples.

isFALSE: A wrapper for 'identical(x, FALSE)'.

isProperlyNamed: Are all elements of a list / vector uniquely named?

isScalarNA: Checks whether an object is a scalar NA value.

isScalarValue: Is given argument an atomic vector or factor of length 1?

isSubset: Check subset relation on two vectors.

isSuperset: Check superset relation on two vectors.

isValidName: Can some strings be used for column or list element names...

itostr: Convert Integers to Strings

lib: A wrapper for 'library'.

load2: Load RData file and return objects in it.

lsort: A wrapper for 'sort' to sort using the "C" collating rules.

makeDataFrame: Initialize data.frame in a convenient way.

makeFileCache: A caching wrapper around load2.

makeProgressBar: Create a progress bar with estimated time.

makeS3Obj: Simple constructor for S3 objects based on lists.

makeSimpleFileLogger: Simple logger which outputs to a file.

mapValues: Replace values in atomic vectors

messagef: Wrapper for message and sprintf.

namedList: Create named list, possibly initialized with a certain...

names2: Replacement for names which always returns a vector.

nin: Simply a negated 'in' operator.

normalize: Normalizes numeric data to a given scale.

optimizeSubInts: Naive multi-start version of 'optimize' for global...

pause: Pause in interactive mode and continue on <Enter>.

printHead: More meaningful 'head(df)' output.

printStrToChar: Print 'str(x)' of an object to a string / character vector.

printToChar: Prints object to a string / character vector.

rangeVal: Calculate range statistic.

requirePackages: Require some packages.

rowLapply: Apply function to rows of a data frame.

save2: Save multiple objects to a file.

seq_row: Generate sequences along rows or cols.

setAttribute: A wrapper for 'attr(x, which) = y'.

setClasses: A wrapper for 'class(x) = classes'.

setRowNames: Wrapper for 'rownames(x) = y', 'colnames(x) = y'.

setValue: Set a list element to a new value.

sortByCol: Sort the rows of a data.frame according to one or more...

splitPath: Split a path into components

splitTime: Split seconds into handy chunks of time.

stopf: Wrapper for stop and sprintf.

strrepeat: Repeat and join a string

suppressAll: Suppresses all output except for errors.

symdiff: Calculates symmetric set difference between two sets.

system3: Wrapper for system2 with better return type and...

toRangeStr: Convert a numerical vector into a range string.

vlapply: Apply a function with a predefined return value

warningf: Wrapper for warning and sprintf.

which.first: Find the index of first/last 'TRUE' value in a logical...


addClasses Man page
argsAsNamedList Man page
asMatrixCols Man page
asMatrixRows Man page
asQuoted Man page
binPack Man page
\%btwn\% Man page
capitalizeStrings Man page
catf Man page
cFactor Man page
checkArg Man page
checkListElementClass Man page
chunk Man page
clipString Man page
coalesce Man page
collapse Man page
collapsef Man page
computeMode Man page
convertColsToList Man page
convertDataFrameCols Man page
convertDfCols Man page
convertInteger Man page
convertIntegers Man page
convertListOfRowsToDataFrame Man page
convertMatrixType Man page
convertRowsToList Man page
convertToShortString Man page
dapply Man page
deprecated Man page
do.call2 Man page
dropNamed Man page
ensureVector Man page
explode Man page
extractSubList Man page
filterNull Man page
getAttributeNames Man page
getBestIndex Man page
getClass1 Man page
getFirst Man page
getLast Man page
getMaxIndex Man page
getMaxIndexOfCols Man page
getMaxIndexOfRows Man page
getMinIndex Man page
getMinIndexOfCols Man page
getMinIndexOfRows Man page
getOperatingSystem Man page
getRelativePath Man page
getUnixTime Man page
getUsedFactorLevels Man page
hasAttributes Man page
insert Man page
isDarwin Man page
isDirectory Man page
isEmptyDirectory Man page
is.error Man page
isExpensiveExampleOk Man page
isFALSE Man page
isLinux Man page
isProperlyNamed Man page
isScalarCharacter Man page
isScalarComplex Man page
isScalarFactor Man page
isScalarInteger Man page
isScalarLogical Man page
isScalarNA Man page
isScalarNumeric Man page
isScalarValue Man page
isSubset Man page
isSuperset Man page
isUnix Man page
isValidName Man page
isWindows Man page
itostr Man page
lib Man page
listToShortString Man page
load2 Man page
lsort Man page
makeDataFrame Man page
makeFileCache Man page
makeProgressBar Man page
makeS3Obj Man page
makeSimpleFileLogger Man page
mapValues Man page
messagef Man page
namedList Man page
names2 Man page
\%nin\% Man page
normalize Man page
optimizeSubInts Man page
pause Man page
printHead Man page
printStrToChar Man page
printToChar Man page
ProgressBar Man page
rangeVal Man page
requirePackages Man page
rowLapply Man page
rowSapply Man page
save2 Man page
seq_col Man page
seq_row Man page
setAttribute Man page
setClasses Man page
setColNames Man page
setRowNames Man page
setValue Man page
SimpleFileLogger Man page
sortByCol Man page
splitPath Man page
splitTime Man page
stopf Man page
strrepeat Man page
suppressAll Man page
symdiff Man page
system3 Man page
toRangeStr Man page
vcapply Man page
viapply Man page
vlapply Man page
vnapply Man page
warningf Man page
which.first Man page
which.last Man page


tests/testthat/test_seq.R tests/testthat/test_convertListOfRowsToDataFrame.R tests/testthat/test_isValidNames.R tests/testthat/test_asMatrix.R tests/testthat/test_nin.R tests/testthat/test_checkArg.R tests/testthat/test_factor.R tests/testthat/test_insert.R tests/testthat/test_isFALSE.R tests/testthat/test_getUnixTime.R tests/testthat/test_filterNull.R tests/testthat/test_rangeVal.R tests/testthat/test_load2_save2.R tests/testthat/test_makeSimpleFileLogger.R tests/testthat/test_isScalarValue.R tests/testthat/test_collapse.R tests/testthat/test_getClass1.R tests/testthat/test_dropNamed.R tests/testthat/test_computeMode.R tests/testthat/test_convertMatrixType.R tests/testthat/test_btwn.R tests/testthat/test_splitTime.R tests/testthat/test_lsort.R tests/testthat/test_explode.R tests/testthat/test_printf.R tests/testthat/test_normalize.R tests/testthat/test_setAttribute.R tests/testthat/test_isProperlyNamed.R tests/testthat/test_printToChar.R tests/testthat/test_is_error.R tests/testthat/test_addClasses.R tests/testthat/test_sortByCol.R tests/testthat/test_optimizeSubInts.R tests/testthat/test_makeProgressBar.R tests/testthat/test_capitalizeStrings.R tests/testthat/test_checkListElementClass.R tests/testthat/test_convertRowsToList.R tests/testthat/test_system3.R tests/testthat/test_collapsef.R tests/testthat/test_setClasses.R tests/testthat/test_toRangeStr.R tests/testthat/test_setRowColNames.R tests/testthat/test_symdiff.R tests/testthat/test_strrepeat.R tests/testthat/test_extractSubList.R tests/testthat/test_isScalarNA.R tests/testthat/test_clipString.R tests/testthat/test_binPack.R tests/testthat/test_convertToShortString.R tests/testthat/test_suppressAll.R tests/testthat/test_getOperatingSystem.R tests/testthat/test_getAttributeNames.R tests/testthat/test_makeDataFrame.R tests/testthat/test_rowLapply.R tests/testthat/test_chunk.R tests/testthat/test_getMaxColRowIndex.R tests/testthat/test_convertInteger.R tests/testthat/test_setValue.R tests/testthat/test_printHead.R tests/testthat/test_requirePackages.R tests/testthat/test_hasAttributes.R tests/testthat/test_namedList.R tests/testthat/test_getRelativePath.R tests/testthat/test_splitPath.R tests/testthat/test_getUsedFactorLevels.R tests/testthat/test_asQuoted.R tests/testthat/test_which.first.last.R tests/testthat/test_coalesce.R tests/testthat/test_itostr.R tests/testthat/test_getMaxIndex.R tests/testthat/test_dapply.R tests/testthat/test_getFirstLast.R tests/testthat/test_ensureVector.R tests/testthat/test_printStrToChar.R tests/testthat/test_mapValues.R tests/testthat/test_do.call2.R tests/testthat/test_convertDataFrameCols.R tests/testthat/test_is.subsetsuperset.R tests/testthat/test_directory.R
R/getMaxIndex.R R/mapValues.R R/FileCache.R R/isSubset.R R/setAttribute.R R/namedList.R R/seq.R R/coalesce.R R/rangeVal.R R/getClass1.R R/checkListElementClass.R R/getMaxColIndex.R R/setRowColNames.R R/checkArg.R R/load2.R R/pause.R R/makeDataFrame.R R/convertToShortString.R R/computeMode.R R/isProperlyNamed.R R/sortByCol.R R/optimizeSubInts.R R/makeProgressBar.R R/directory.R R/stopf.R R/convertRowsToList.R R/addClasses.R R/splitTime.R R/symdiff.R R/isExpensiveExampleOk.R R/clipString.R R/btwn.R R/isScalarNA.R R/matchDataFrameSubset.R R/names2.R R/insert.R R/isFALSE.R R/itostr.R R/factor.R R/getUsedFactorLevels.R R/binPack.R R/isScalarValue.R R/which.first.R R/getRelativePath.R R/ensureVector.R R/do.call2.R R/asMatrix.R R/messagef.R R/makeS3Obj.R R/catf.R R/setValue.R R/dapply.R R/vapply.R R/toRangeStr.R R/rowLapply.R R/system3.R R/getFirstLast.R R/argsAsNamedList.R R/getAttributeNames.R R/setClasses.R R/suppressAll.R R/explode.R R/convertInteger.R R/collapsef.R R/printHead.R R/convertListOfRowsToDataFrame.R R/nin.R R/requirePackages.R R/isSuperset.R R/asQuoted.R R/normalize.R R/strrepeat.R R/printStrToChar.R R/filterNull.R R/getOperatingSystem.R R/capitalizeStrings.R R/collapse.R R/hasAttributes.R R/chunk.R R/isValidName.R R/makeSimpleFileLogger.R R/lib.R R/printToChar.R R/convertDataFrameCols.R R/warningf.R R/extractSubList.R R/save2.R R/dropNamed.R R/is_error.R R/zzz_deprecated.R R/zzz.R R/lsort.R R/getUnixTime.R R/splitPath.R R/convertMatrixType.R
man/dropNamed.Rd man/strrepeat.Rd man/getOperatingSystem.Rd man/optimizeSubInts.Rd man/convertMatrixType.Rd man/extractSubList.Rd man/checkListElementClass.Rd man/setValue.Rd man/isProperlyNamed.Rd man/catf.Rd man/symdiff.Rd man/messagef.Rd man/getAttributeNames.Rd man/lsort.Rd man/getMaxIndex.Rd man/deprecated.Rd man/itostr.Rd man/isValidName.Rd man/which.first.Rd man/getUsedFactorLevels.Rd man/convertDataFrameCols.Rd man/isScalarNA.Rd man/setClasses.Rd man/makeFileCache.Rd man/names2.Rd man/binPack.Rd man/requirePackages.Rd man/isEmptyDirectory.Rd man/asQuoted.Rd man/rangeVal.Rd man/convertIntegers.Rd man/load2.Rd man/makeDataFrame.Rd man/capitalizeStrings.Rd man/getRelativePath.Rd man/splitPath.Rd man/getUnixTime.Rd man/nin.Rd man/isScalarValue.Rd man/pause.Rd man/collapsef.Rd man/computeMode.Rd man/printHead.Rd man/isDirectory.Rd man/save2.Rd man/isFALSE.Rd man/is.error.Rd man/vlapply.Rd man/isExpensiveExampleOk.Rd man/mapValues.Rd man/explode.Rd man/do.call2.Rd man/setAttribute.Rd man/convertToShortString.Rd man/insert.Rd man/chunk.Rd man/makeSimpleFileLogger.Rd man/lib.Rd man/coalesce.Rd man/filterNull.Rd man/convertInteger.Rd man/namedList.Rd man/getClass1.Rd man/dapply.Rd man/normalize.Rd man/warningf.Rd man/stopf.Rd man/rowLapply.Rd man/ensureVector.Rd man/collapse.Rd man/clipString.Rd man/printToChar.Rd man/sortByCol.Rd man/argsAsNamedList.Rd man/suppressAll.Rd man/splitTime.Rd man/getFirst.Rd man/makeS3Obj.Rd man/makeProgressBar.Rd man/seq_row.Rd man/checkArg.Rd man/cFactor.Rd man/system3.Rd man/isSuperset.Rd man/convertRowsToList.Rd man/hasAttributes.Rd man/asMatrixCols.Rd man/isSubset.Rd man/setRowNames.Rd man/printStrToChar.Rd man/getMaxIndexOfRows.Rd man/toRangeStr.Rd man/btwn.Rd man/convertListOfRowsToDataFrame.Rd man/addClasses.Rd

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.