Learn R Programming

⚠️There's a newer version (1.13) of this package.Take me there.

BBmisc (version 1.5)

Miscellaneous helper functions for B. Bischl.

Description

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

Copy Link

Version

Install

install.packages('BBmisc')

Monthly Downloads

11,640

Version

1.5

License

BSD_3_clause + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Bernd Bischl

Last Published

January 24th, 2014

Functions in BBmisc (1.5)

getOperatingSystem

Functions to determine the operating system.
splitTime

Split seconds into handy chunks of time.
chunk

Chunk elements of vectors into blocks of nearly equal size.
isExpensiveExampleOk

Conditional checking for expensive examples.
setRowNames

Wrapper for rownames(x) = y, colnames(x) = y.
pause

Pause in interactive mode and continue on .
convertDfCols

DEPRECATED
extractSubList

Extracts a named element from a list of lists.
addClasses

A wrapper to add to the class attribute.
load2

Load RData file and return objects in it.
requirePackages

Require some packages.
seq_row

Generate sequences along rows or cols.
getMaxIndexOfRows

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

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

Combine multiple factors and return a factor.
%nin%

Simply a negated in operator.
stopf

Wrapper for stop and sprintf.
printToChar

Prints object to a string / character vector.
makeSimpleFileLogger

Simple logger which outputs to a file.
makeDataFrame

Initialize data.frame in a convenient way.
convertRowsToList

Convert rows of data.frame or matrix to lists.
do.call2

Execute a function call similar to do.call.
computeMode

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

Wrapper for cat and sprintf.
convertInteger

Conversion for single integer.
isEmptyDirectory

Is one / are several directories empty?
system3

Wrapper for system2 with better return type and errorhandling.
isProperlyNamed

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

Check that a list contains only elements of a required type.
collapse

Collapse vector to string.
makeProgressBar

Create a progress bar with estimated time.
dropNamed

Drop named elements of an object.
insert

Insert elements from one list/vector into another list/vector.
checkArg

Check for a function argument.
suppressAll

Suppresses all output except for errors.
makeS3Obj

Simple constructor for S3 objects based on lists.
isFALSE

A wrapper for identical(x, FALSE).
convertDataFrameCols

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

Shortens strings to a given length.
convertToShortString

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

Is one / are several files a directory?
listToShortString

DEPRECATED
namedList

Create named list, possibly initialized with a certain element.
is.error

Is return value of try an exception?
save2

Save multiple objects to a file.
isScalarValue

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

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

A wrapper for sort to sort using the C collating rules.
names2

Replacement for names which always returns a vector.
strrepeat

Repeat and join a string
stringsAsFactors

DEPRECATED
argsAsNamedList

Parses ... arguments to a named list.
convertIntegers

Conversion for integer vector.
isValidName

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

Checks whether an object is a scalar NA value.
binPack

Simple bin packing.
getMaxIndex

Return index of maximal/minimal element in numerical vector.
coalesce

Returns first non-missing, non-null argument.
messagef

Wrapper for message and sprintf.
warningf

Wrapper for warning and sprintf.
setAttribute

A wrapper for attr(x, which) = y.
getUnixTime

Current time in seconds.
setClasses

A wrapper for class(x) = classes.
toRangeStr

Convert a numerical vector into a range string.
lib

A wrapper for library.
rowLapply

Apply function to rows of a data frame.