Learn R Programming

BBmisc (version 1.13.1)

Miscellaneous Helper Functions for B. Bischl

Description

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

Copy Link

Version

Install

install.packages('BBmisc')

Monthly Downloads

49,087

Version

1.13.1

License

BSD_2_clause + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Bernd Bischl

Last Published

January 21st, 2026

Functions in BBmisc (1.13.1)

convertListOfRowsToDataFrame

Convert a list of row-vector of equal structure to a data.frame
convertInteger

Conversion for single integer
getClass1

Wrapper for class(x)[1]
isProperlyNamed

Are all elements of a list / vector uniquely named?
isScalarNA

Checks whether an object is a scalar NA value
getAttributeNames

Helper function for determining the vector of attribute names of a given object
isEmptyDirectory

Is one / are several directories empty?
isDirectory

Is one / are several files a directory?
getOperatingSystem

Functions to determine the operating system
getMaxIndexOfRows

Find row- or columnwise the index of the maximal / minimal element in a matrix
getMaxIndex

Return index of maximal/minimal/best element in numerical vector
getFirst

Get the first/last element of a list/vector
explode

Split up a string into substrings
ensureVector

Blow up single scalars / objects to vectors / list by replication
convertDataFrameCols

Converts columns in a data frame to characters, factors or numerics
convertRowsToList

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

Can some strings be used for column or list element names without problems?
isSuperset

Check superset relation on two vectors
makeFileCache

A caching wrapper around load2
getUsedFactorLevels

Determines used factor levels
makeDataFrame

Initialize data.frame in a convenient way
hasAttributes

Check if given object has certain attributes
load2

Load RData file and return objects in it
optimizeSubInts

normalize

Normalizes numeric data to a given scale
lsort

A wrapper for sort to sort using the “C” collating rules
save2

Save multiple objects to a file
mapValues

Replace values in atomic vectors
makeSimpleFileLogger

Simple logger which outputs to a file
rowLapply

Apply function to rows of a data frame
printStrToChar

Print str(x) of an object to a string / character vector
printToChar

Prints object to a string / character vector
deprecated

Deprecated function. Do not use!
dapply

Call lapply on an object and return a data.frame
convertIntegers

Conversion for integer vector
convertToShortString

Converts any R object to a descriptive string so it can be used in messages
pause

Pause in interactive mode and continue on <Enter>.
strrepeat

Repeat and join a string
stopf

Wrapper for stop and sprintf
isExpensiveExampleOk

Conditional checking for expensive examples
vlapply

Apply a function with a predefined return value
warningf

Wrapper for warning and sprintf
setRowNames

Wrapper for rownames(x) = y, colnames(x) = y
setClasses

A wrapper for class(x) = classes
convertMatrixType

Converts storage type of a matrix
isSubset

Check subset relation on two vectors
is.error

Is return value of try an exception?
isScalarValue

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

Insert elements from one list/vector into another list/vector
names2

Replacement for names which always returns a vector
sortByCol

Sort the rows of a data.frame according to one or more columns
rangeVal

Calculate range statistic
makeS3Obj

Simple constructor for S3 objects based on lists
makeProgressBar

Create a progress bar with estimated time
extractSubList

Extracts a named element from a list of lists
printHead

More meaningful head(df) output
setValue

Set a list element to a new value
%nin%

Simply a negated in operator
getRelativePath

Construct a path relative to another
isFALSE

A wrapper for identical(x, FALSE)
filterNull

Filter a list for NULL values
namedList

Create named list, possibly initialized with a certain element
seq_row

Generate sequences along rows or cols
messagef

Wrapper for message and sprintf
itostr

Convert Integers to Strings
getUnixTime

Current time in seconds
lib

A wrapper for library
setAttribute

A wrapper for attr(x, which) = y
suppressAll

Suppresses all output except for errors
symdiff

Calculates symmetric set difference between two sets
which.first

Find the index of first/last TRUE value in a logical vector
toRangeStr

Convert a numerical vector into a range string
splitTime

Split seconds into handy chunks of time
system3

Wrapper for system2 with better return type and errorhandling
splitPath

Split a path into components
requirePackages

Require some packages
checkArg

Check for a function argument
catf

Wrapper for cat and sprintf
cFactor

Combine multiple factors and return a factor
binPack

Simple bin packing
%btwn%

Check if some values are covered by the range of the values in a second vector
asMatrixCols

Extracts a named element from a list of lists
asQuoted

Converts a string into a quoted expression
addClasses

A wrapper to add to the class attribute
capitalizeStrings

Capitalize strings in a vector
argsAsNamedList

Parses ... arguments to a named list
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
collapsef

Collapse vector to string
computeMode

Compute statistical mode of a vector (value that occurs most frequently)
collapse

Collapse vector to string
checkListElementClass

Check that a list contains only elements of a required type
do.call2

Execute a function call similar to do.call
dropNamed

Drop named elements of an object