BBmisc: Miscellaneous Helper Functions for B. Bischl

Share:

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

Author
Bernd Bischl [aut, cre], Michel Lang [aut], Jakob Bossek [aut], Daniel Horn [aut], Jakob Richter [aut], Dirk Surmann [aut]
Date of publication
2016-07-12 07:49:34
Maintainer
Bernd Bischl <bernd_bischl@gmx.net>
License
BSD_3_clause + file LICENSE
Version
1.10
URLs

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-vectors 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 'do.call'.
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 element in numerical vector.
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>.
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...

Files in this package

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