[med-svn] [r-cran-bbmisc] 03/04: New upstream version 1.11

Andreas Tille tille at debian.org
Mon Oct 9 09:30:20 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository r-cran-bbmisc.

commit 05e1bd3c65f4c35ed7a0ef23a06ea6b15af270e1
Author: Andreas Tille <tille at debian.org>
Date:   Mon Oct 9 11:27:09 2017 +0200

    New upstream version 1.11
---
 DESCRIPTION                                        |  14 +-
 LICENSE                                            |   5 +-
 MD5                                                | 228 +++++++++++----------
 NAMESPACE                                          |   2 +
 NEWS                                               |  15 +-
 R/addClasses.R                                     |   5 +-
 R/checkArg.R                                       |  22 +-
 R/coalesce.R                                       |  20 +-
 R/convertListOfRowsToDataFrame.R                   |  12 +-
 R/convertToShortString.R                           |  34 +--
 R/ensureVector.R                                   |  22 +-
 R/getMaxIndex.R                                    |  20 +-
 R/matchDataFrameSubset.R                           |   4 +-
 R/namedList.R                                      |   7 +-
 R/printHead.R                                      |  23 +++
 man/addClasses.Rd                                  |   6 +-
 man/argsAsNamedList.Rd                             |   1 -
 man/asMatrixCols.Rd                                |   1 -
 man/asQuoted.Rd                                    |   1 -
 man/binPack.Rd                                     |   1 -
 man/btwn.Rd                                        |   1 -
 man/cFactor.Rd                                     |   1 -
 man/capitalizeStrings.Rd                           |   1 -
 man/catf.Rd                                        |   1 -
 man/checkArg.Rd                                    |  21 +-
 man/checkListElementClass.Rd                       |   1 -
 man/chunk.Rd                                       |   1 -
 man/clipString.Rd                                  |   1 -
 man/coalesce.Rd                                    |   8 +-
 man/collapse.Rd                                    |   1 -
 man/collapsef.Rd                                   |   1 -
 man/computeMode.Rd                                 |   1 -
 man/convertDataFrameCols.Rd                        |   1 -
 man/convertInteger.Rd                              |   1 -
 man/convertIntegers.Rd                             |   1 -
 man/convertListOfRowsToDataFrame.Rd                |  12 +-
 man/convertMatrixType.Rd                           |   1 -
 man/convertRowsToList.Rd                           |   3 +-
 man/convertToShortString.Rd                        |   4 +-
 man/dapply.Rd                                      |   1 -
 man/deprecated.Rd                                  |   3 +-
 man/do.call2.Rd                                    |   1 -
 man/dropNamed.Rd                                   |   1 -
 man/ensureVector.Rd                                |  18 +-
 man/explode.Rd                                     |   1 -
 man/extractSubList.Rd                              |   1 -
 man/filterNull.Rd                                  |   1 -
 man/getAttributeNames.Rd                           |   1 -
 man/getClass1.Rd                                   |   1 -
 man/getFirst.Rd                                    |   1 -
 man/getMaxIndex.Rd                                 |  17 +-
 man/getMaxIndexOfRows.Rd                           |   5 +-
 man/getOperatingSystem.Rd                          |   7 +-
 man/getRelativePath.Rd                             |   1 -
 man/getUnixTime.Rd                                 |   1 -
 man/getUsedFactorLevels.Rd                         |   1 -
 man/hasAttributes.Rd                               |   1 -
 man/insert.Rd                                      |   1 -
 man/is.error.Rd                                    |   1 -
 man/isDirectory.Rd                                 |   1 -
 man/isEmptyDirectory.Rd                            |   1 -
 man/isExpensiveExampleOk.Rd                        |   1 -
 man/isFALSE.Rd                                     |   1 -
 man/isProperlyNamed.Rd                             |   1 -
 man/isScalarNA.Rd                                  |   1 -
 man/isScalarValue.Rd                               |  11 +-
 man/isSubset.Rd                                    |   1 -
 man/isSuperset.Rd                                  |   1 -
 man/isValidName.Rd                                 |   1 -
 man/itostr.Rd                                      |   1 -
 man/lib.Rd                                         |   1 -
 man/load2.Rd                                       |   1 -
 man/lsort.Rd                                       |   1 -
 man/makeDataFrame.Rd                               |   1 -
 man/makeFileCache.Rd                               |   1 -
 man/makeProgressBar.Rd                             |   3 +-
 man/makeS3Obj.Rd                                   |   1 -
 man/makeSimpleFileLogger.Rd                        |   3 +-
 man/mapValues.Rd                                   |   1 -
 man/messagef.Rd                                    |   1 -
 man/namedList.Rd                                   |   3 +-
 man/names2.Rd                                      |   1 -
 man/nin.Rd                                         |   1 -
 man/normalize.Rd                                   |   1 -
 man/optimizeSubInts.Rd                             |   1 -
 man/pause.Rd                                       |   1 -
 man/printHead.Rd                                   |  25 +++
 man/printStrToChar.Rd                              |   1 -
 man/printToChar.Rd                                 |   1 -
 man/rangeVal.Rd                                    |   1 -
 man/requirePackages.Rd                             |   1 -
 man/rowLapply.Rd                                   |   1 -
 man/save2.Rd                                       |   1 -
 man/seq_row.Rd                                     |   3 +-
 man/setAttribute.Rd                                |   1 -
 man/setClasses.Rd                                  |   1 -
 man/setRowNames.Rd                                 |   3 +-
 man/setValue.Rd                                    |   1 -
 man/sortByCol.Rd                                   |   1 -
 man/splitPath.Rd                                   |   1 -
 man/splitTime.Rd                                   |   1 -
 man/stopf.Rd                                       |   1 -
 man/strrepeat.Rd                                   |   1 -
 man/suppressAll.Rd                                 |   1 -
 man/symdiff.Rd                                     |   1 -
 man/system3.Rd                                     |   1 -
 man/toRangeStr.Rd                                  |   1 -
 man/vlapply.Rd                                     |   5 +-
 man/warningf.Rd                                    |   1 -
 man/which.first.Rd                                 |   1 -
 src/init.c                                         |  28 +++
 tests/testthat/test_convertListOfRowsToDataFrame.R |  24 ++-
 tests/testthat/test_convertToShortString.R         |   5 +-
 tests/testthat/test_ensureVector.R                 |   6 +
 tests/testthat/test_getMaxIndex.R                  |  48 +++--
 tests/testthat/test_namedList.R                    |   2 +-
 tests/testthat/test_printHead.R                    |   9 +
 117 files changed, 439 insertions(+), 352 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index c533313..e24cde9 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,26 +1,26 @@
 Package: BBmisc
 Title: 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.
+    some other guys, mainly for package development.
 Authors at R: c(person("Bernd", "Bischl", email = "bernd_bischl at gmx.net",
     role = c("aut", "cre")), person("Michel", "Lang", email =
     "michellang at gmail.com", role = "aut"), person("Jakob", "Bossek", email =
-    "jakob.bossek at tu-dortmund.de", role = "aut"), person("Daniel", "Horn",
+    "j.bossek at gmail.com", role = "aut"), person("Daniel", "Horn",
     email = "daniel.horn at tu-dortmund.de", role = "aut"), person("Jakob",
     "Richter", email = "code at jakob-r.de", role = "aut"), person("Dirk", "Surmann",
     email = "surmann at statistik.tu-dortmund.de", role = "aut"))
 URL: https://github.com/berndbischl/BBmisc
 BugReports: https://github.com/berndbischl/BBmisc/issues
-License: BSD_3_clause + file LICENSE
+License: BSD_2_clause + file LICENSE
 Encoding: UTF-8
 Imports: utils, methods, stats, checkmate (>= 1.8.0)
 Suggests: testthat, microbenchmark, codetools
 LazyData: yes
 ByteCompile: yes
-Version: 1.10
-RoxygenNote: 5.0.1
+Version: 1.11
+RoxygenNote: 6.0.1
 NeedsCompilation: yes
-Packaged: 2016-07-11 21:52:13 UTC; bischl
+Packaged: 2017-03-09 20:34:04 UTC; bischl
 Author: Bernd Bischl [aut, cre],
   Michel Lang [aut],
   Jakob Bossek [aut],
@@ -29,4 +29,4 @@ Author: Bernd Bischl [aut, cre],
   Dirk Surmann [aut]
 Maintainer: Bernd Bischl <bernd_bischl at gmx.net>
 Repository: CRAN
-Date/Publication: 2016-07-12 07:49:34
+Date/Publication: 2017-03-10 00:20:46
diff --git a/LICENSE b/LICENSE
index 317fad7..ac84d81 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,3 +1,2 @@
-YEAR: 2013-2016
-COPYRIGHT HOLDER: Bernd Bischl, Michel Lang, Olaf Mersmann
-ORGANIZATION: TU Dortmund University
+YEAR: 2013-2017
+COPYRIGHT HOLDER: Bernd Bischl
diff --git a/MD5 b/MD5
index b854d46..4e3fb9b 100644
--- a/MD5
+++ b/MD5
@@ -1,9 +1,9 @@
-7f04456c01086283ae78d2a9229ee413 *DESCRIPTION
-7386455b2e450986702039704e0fb450 *LICENSE
-ccf9ccf74832d34a66cdd556bd6c1fdd *NAMESPACE
-cc5be62c141bb87446789fc76e82405a *NEWS
+ba0a9871754e3d2a3e3c672c0816191e *DESCRIPTION
+835c958ee5c6e6c07b2cb6221216f099 *LICENSE
+125bb10b4c4558ebf99bb419e8ab5a9b *NAMESPACE
+723fc09225afb4febb8a0456a1c66a03 *NEWS
 c95ee93ae6e1cc3d139e16f1a1c485f9 *R/FileCache.R
-37649421ad19b638a665553cd24b0745 *R/addClasses.R
+ce78f38aa3f0944e0f2ce97b4f14a065 *R/addClasses.R
 a19fab5e53b23926efcf64953f49bf40 *R/argsAsNamedList.R
 3d8824dab593e1f1647d850e94cc1cc5 *R/asMatrix.R
 05e6ba9ccfb6be15b97ed2cdfd97d9a4 *R/asQuoted.R
@@ -11,25 +11,25 @@ a19fab5e53b23926efcf64953f49bf40 *R/argsAsNamedList.R
 88faf131b900a83f9c0c85620488b786 *R/btwn.R
 56df88099f262e40fd104594a2c7731f *R/capitalizeStrings.R
 40a799be55e2562f2b188eeb2cd63ff2 *R/catf.R
-953550836992d4cd19b1661c8c74bb03 *R/checkArg.R
+fde0dd8e5637b9491aa90c2084d024f9 *R/checkArg.R
 607b3b87c142d997f15f1d34eb96c0bb *R/checkListElementClass.R
 a7c0552b6aa7d2c1691d82cff4485376 *R/chunk.R
 48f916754d922673ab8f2ec2918109d9 *R/clipString.R
-956e3cfd733539748a02c213def678e2 *R/coalesce.R
+cc1345aeffafaad95be7cd58380c241f *R/coalesce.R
 6474806e25c753e2e6d38ed2e2b83cd0 *R/collapse.R
 f19ea97de980e17af2cfdd33eb572801 *R/collapsef.R
 d796fa44ef59e09f21731b72287ed143 *R/computeMode.R
 6182369f5487ee733e9ddb638adcb064 *R/convertDataFrameCols.R
 3127c59099d3f0831d425831e0a017bb *R/convertInteger.R
-2dc25130974b33de32138bfae346c6fa *R/convertListOfRowsToDataFrame.R
+a5a5dd71cec015752e29c3de500b6c06 *R/convertListOfRowsToDataFrame.R
 25cbea8b92cd9c71359abe1de6aba3e3 *R/convertMatrixType.R
 0aa7f94d326d17433e3ca503881f5bf4 *R/convertRowsToList.R
-a768bf8674db3d5d83d5c5a26c83f4c8 *R/convertToShortString.R
+b05148a7486645612ad31d1b1cee6d24 *R/convertToShortString.R
 a248fcb5e54b59f424197c693ed75253 *R/dapply.R
 dfb0e871e12fc0492300a86736ccdcf4 *R/directory.R
 a92a461f1665ac3fe620d1f4e9066662 *R/do.call2.R
 d15bb0426abfc93d43a20f5b8d8b543c *R/dropNamed.R
-49cd376e7333baa103869d9655b6ec20 *R/ensureVector.R
+bbe0c77139726ce8b378f72e0cd06633 *R/ensureVector.R
 ec76a08226506c0a516855fc2fc298b6 *R/explode.R
 e9fcae1462308da4ad61b4acc4d0aa5f *R/extractSubList.R
 96f106167198d3d08d87cfb050eaf48e *R/factor.R
@@ -38,7 +38,7 @@ ed1f7d50dc0893c6e1973f34e344ce5f *R/filterNull.R
 263e6489983e592d783815becbd3912c *R/getClass1.R
 a8a2859a4953fcbfefcbdeae4d1cb345 *R/getFirstLast.R
 bd60735efe4a46064ca0276fc44830ff *R/getMaxColIndex.R
-58010b87a6888d602cc01980b04bf411 *R/getMaxIndex.R
+77d3da8c20b3357882b5ddf525750aff *R/getMaxIndex.R
 e3a5d3c9ed3fa73f1fea676c8c128c44 *R/getOperatingSystem.R
 be6b3175d3a59a13cec139f078340cc5 *R/getRelativePath.R
 9e51abee4abe6e78930245bc9c4b1aaa *R/getUnixTime.R
@@ -63,14 +63,15 @@ ca0e4b8b642961b4d3d095fd5e9037c6 *R/makeProgressBar.R
 3005179353ae8a3fe527e2f4d4e4c5a3 *R/makeS3Obj.R
 e4c87c84ca1820b2645dd8ba1447bcf6 *R/makeSimpleFileLogger.R
 f4549d2b6ab7380fae0734c9ca4e72f5 *R/mapValues.R
-a08101a5130a04405545295a434f234f *R/matchDataFrameSubset.R
+37bf66a89beb286130e56c53e8980c67 *R/matchDataFrameSubset.R
 1d93558247bae14825e63544d8567985 *R/messagef.R
-bbea4b5fddb93dab9e4d7ccd467fbef6 *R/namedList.R
+cb6375e52167a659de8cf4d06b9d41b6 *R/namedList.R
 d7a212dac2515883b8b947f3139e7fcd *R/names2.R
 a75f48f5cc0bff7e3774951c276ee775 *R/nin.R
 ef042ba4a544e8dee75edea118113ee1 *R/normalize.R
 de8e6cb465cdd3dd19321cf6ac213d2b *R/optimizeSubInts.R
 599ace969590b37f3c2c88b14c57d762 *R/pause.R
+b0fa71d0c105f19598581a68cfd52181 *R/printHead.R
 b6fd8274f38b9b99c0a742154598717a *R/printStrToChar.R
 92bfd135c7de27f135e7823996aff04d *R/printToChar.R
 971a824767489aa432bf9ca2e4f60e88 *R/rangeVal.R
@@ -96,104 +97,106 @@ d5ebd95cd601d2249b07774e7ff1248b *R/strrepeat.R
 1fe4c8b9e67056c6b1787a4e5d320dba *R/which.first.R
 9db98a4c3deb05ca23f6139604c794e7 *R/zzz.R
 7d9630f2dc37f2231c41816527f84a59 *R/zzz_deprecated.R
-6c28e23a9ee33395fb45fc19114cb26e *man/addClasses.Rd
-85cf6c5b5efcabe05cc8260c1460245f *man/argsAsNamedList.Rd
-7be55e4c70ef62a0cda1757e06eaf467 *man/asMatrixCols.Rd
-16349c85ef00afcd0ad77736c2077f5a *man/asQuoted.Rd
-7b4571d7c1d82da7ec431613cce6850f *man/binPack.Rd
-fdca94ba02a32deca58ad35251456133 *man/btwn.Rd
-976ed6fc3fad483006b818710dd45286 *man/cFactor.Rd
-6ed86f1c9e66d0940d7151d492118dd9 *man/capitalizeStrings.Rd
-ed3d33f51d96103c2ec07f2574bad2a9 *man/catf.Rd
-8b5ca1458a0326e6252d74dd1a0c254b *man/checkArg.Rd
-355651c0810deac8da4a623247268107 *man/checkListElementClass.Rd
-ed1d51f496879bb54c564b7654182c87 *man/chunk.Rd
-fd3921e0da60adc117341d1094f588f9 *man/clipString.Rd
-ecd1ccb7fd6e4ba6f00fbd3ab891789c *man/coalesce.Rd
-6f2baa7edbc662353bb9c3213123141d *man/collapse.Rd
-b558e5ac90f6d7d1406b13f3138ffb76 *man/collapsef.Rd
-621e69a40369c775d1c6e5ef7f44de48 *man/computeMode.Rd
-f8d7492cf45ea2c39432171c43116dff *man/convertDataFrameCols.Rd
-2708b65e90936066674d398bce7e829c *man/convertInteger.Rd
-b61a0cc0163e8716dfb390635049dda4 *man/convertIntegers.Rd
-c0f1a10fc0b9810c5957008b1515042b *man/convertListOfRowsToDataFrame.Rd
-707ebae4c6576b07a5b82bf6dcf5fdf0 *man/convertMatrixType.Rd
-92378bffb4926f0cdf0b85ca75e06c81 *man/convertRowsToList.Rd
-a8692024ce85cbe225ac3ee00836552c *man/convertToShortString.Rd
-99084a0e97a9a2469bc770e22707a809 *man/dapply.Rd
-cc24024f295ef352113c19230f93d04d *man/deprecated.Rd
-964684cd29306a03770f99737063b844 *man/do.call2.Rd
-0bd727a23a077c1ed3a578dec7fd6f72 *man/dropNamed.Rd
-6800348de281bca9f6eb9946bbb6bf30 *man/ensureVector.Rd
-1b61610ad6fe1975e02cb50b6b162884 *man/explode.Rd
-3357bef2ea30da934391546454f187f4 *man/extractSubList.Rd
-2aafaf931dd6640c7700694c53b8bdc1 *man/filterNull.Rd
-803459a58003642e781eea8ac798440c *man/getAttributeNames.Rd
-e1e6a2023c12bc332a3c9a0a64c6801c *man/getClass1.Rd
-e4b68b19f5b651cdd80946a4d12c1086 *man/getFirst.Rd
-e1424b0e53724d037142c00e791004b3 *man/getMaxIndex.Rd
-b90f6d3e901454606780b4c1d023f280 *man/getMaxIndexOfRows.Rd
-e8954aa148674246b103f64dca2ced64 *man/getOperatingSystem.Rd
-1709f1853a8e4931e6c6b97be6f71e52 *man/getRelativePath.Rd
-6b0664caf017c404b98bdd879ce20a5b *man/getUnixTime.Rd
-91eb85f9216d302e0a387317c9eddda4 *man/getUsedFactorLevels.Rd
-1ea0bdf0839cd36584c1190edfcf3288 *man/hasAttributes.Rd
-51f57f27f947986f3c93481a6368c2fb *man/insert.Rd
-2bcbb0fdbeac918c13dcaaf810644dff *man/is.error.Rd
-f61d595ea61102ed6a00fc633edd6f40 *man/isDirectory.Rd
-1d865e2ffd8740adeacc3c6c965d0d2a *man/isEmptyDirectory.Rd
-81ee17e9f37134d13c746a440131e910 *man/isExpensiveExampleOk.Rd
-8f6cecb20c7400a2d8528fb061608004 *man/isFALSE.Rd
-365a676e6689dff611d4e7a010c881fe *man/isProperlyNamed.Rd
-a181bd667a7fc0823633ea38700d2f6c *man/isScalarNA.Rd
-2967b168252db866c2fb1c88f1beea2a *man/isScalarValue.Rd
-3b054825c728efd77102723073a104b5 *man/isSubset.Rd
-2b72056638119c0e39b2a40d539097f8 *man/isSuperset.Rd
-0ea08880a8e1f689adbf7949822de67a *man/isValidName.Rd
-90651aa0abd758e0719876345578989b *man/itostr.Rd
-0e2258daf21d6742bff3fad2301e7393 *man/lib.Rd
-f0e3591c35a727e1f7124749f0e1c223 *man/load2.Rd
-d666f370595b8201acabe915284e9a16 *man/lsort.Rd
-7fefd75e404e58eaccd3d6ba1948ebf4 *man/makeDataFrame.Rd
-6384cbfc1f740aec555280a9e86135bb *man/makeFileCache.Rd
-a7757aca00e5a02f9ab16dce645824b4 *man/makeProgressBar.Rd
-03e65bca043ff0713d9ff022190eda08 *man/makeS3Obj.Rd
-395ac5de54a241f43f40fa3d2b5999a0 *man/makeSimpleFileLogger.Rd
-d1b6375176f615d5b5aa4215bda759e6 *man/mapValues.Rd
-0a46b540e78515f5a77653a62829f9ff *man/messagef.Rd
-a60bf8dbf615aaf0c6fb8a9f2f2c989f *man/namedList.Rd
-ecbd929d52368597f0c8c49ad10b77e6 *man/names2.Rd
-fbf72ffa7e7762bdae07c4b50006414d *man/nin.Rd
-0a6c7cc987466c8c734428b493d7fb7e *man/normalize.Rd
-ea2836d3125adcc379acb0d265dcfd43 *man/optimizeSubInts.Rd
-1551f867d369e1aedbc1e7ace9644ea1 *man/pause.Rd
-837250e6548dd68ea6b70cacc14fec50 *man/printStrToChar.Rd
-db2e6fd69ea5a80b32776c6cc090482e *man/printToChar.Rd
-67fb568acdd5918ab7c50461560fce79 *man/rangeVal.Rd
-94142554a8388dc5c436def74e2bc979 *man/requirePackages.Rd
-ac6cc5e47f488c9a782179a31d2dad7e *man/rowLapply.Rd
-9b4c4e14d420bf43da63a51cec671da5 *man/save2.Rd
-28157848c96897deeada64e8128e8a35 *man/seq_row.Rd
-06eb68e6d21da37f3a59df09bc288c77 *man/setAttribute.Rd
-6b8930c78376d505b801b31016c87c54 *man/setClasses.Rd
-fd408b34c1a43915b3c2ba078f267548 *man/setRowNames.Rd
-5a67e663dc42593c5f08ffab26cf855e *man/setValue.Rd
-b136b58c5445ecf67535a675f58f2f5f *man/sortByCol.Rd
-d1f1611fb69f21ee73edc10cd5fb7888 *man/splitPath.Rd
-578271e955afaf5c48336b919f16d49d *man/splitTime.Rd
-3641096790c2e1d1b2e1ac335b15138f *man/stopf.Rd
-54042026ba220e537fbfdd7d3069b830 *man/strrepeat.Rd
-74d6178ea98ca0d0c9f0f8ea1033375a *man/suppressAll.Rd
-61acd2fd22e2d27749bd9e3e8e33a409 *man/symdiff.Rd
-35d6ba8cfd84456e13db37ce9fa3f8fc *man/system3.Rd
-f698231892cc5a45ef5174fad55c80db *man/toRangeStr.Rd
-64b79c04a4b213bfe5279f1ea39afb2b *man/vlapply.Rd
-0949e18ab83d7d8cb3759de70b668f3b *man/warningf.Rd
-7afbd12247784c4fb6fbbc39e5795876 *man/which.first.Rd
+2e75937aa4ee04e1544899c651986f22 *man/addClasses.Rd
+5babaf4ae53289924251a840bb129296 *man/argsAsNamedList.Rd
+be31fe0e007466c8198bd721dc0db621 *man/asMatrixCols.Rd
+880ef7691a86abd1d75a636b914169ab *man/asQuoted.Rd
+7b016ac727f33ab71a79790e646dac56 *man/binPack.Rd
+ac9934b6c2b0f933fdded770278822bd *man/btwn.Rd
+2d1b337c7e0ebe1003cd57423207c1d3 *man/cFactor.Rd
+7e50ee3eae7c9095b25750e3c0aed96c *man/capitalizeStrings.Rd
+0c1c934ed3f3139f741de6903a5a96d8 *man/catf.Rd
+1cd39d778258f91bef4146afe586a2aa *man/checkArg.Rd
+c3286b511589289f8029e9ad40c2612d *man/checkListElementClass.Rd
+2c5815a65304d19f389b775d340876c8 *man/chunk.Rd
+208b518df1d806b1e676f1cabeb6b90d *man/clipString.Rd
+39c4f36dbd189df772debe4833fe5351 *man/coalesce.Rd
+5ab8eed556e8c4e8a79556710deb614c *man/collapse.Rd
+07c425314120608f1ee7c3a121ced0d8 *man/collapsef.Rd
+4a7b373d251c1d5bca781eeba21fdfbf *man/computeMode.Rd
+887195f377b202bea067ab89dd919150 *man/convertDataFrameCols.Rd
+8b2b19cb683be0ead035ce1d8d5edbfa *man/convertInteger.Rd
+6e1aef503be7adfb54642328a7e8cbdd *man/convertIntegers.Rd
+2927be996a679369cf14482ae3df1763 *man/convertListOfRowsToDataFrame.Rd
+b37c5a943b43ad45724cda4a60f5a31e *man/convertMatrixType.Rd
+658e03b301e1cca72bb51c7db43013a8 *man/convertRowsToList.Rd
+3f16efb5330004410c7b032ed5bb5971 *man/convertToShortString.Rd
+371a094c3b724c418412c09178b07039 *man/dapply.Rd
+009a02d8bcbdef93375557f935fe9e31 *man/deprecated.Rd
+eb7039cb1ed62dd03f5e2f7c6211cb75 *man/do.call2.Rd
+79d0076be7286bb570d2aa56083512fd *man/dropNamed.Rd
+fe208848f4844079427e8d22d4d1f11c *man/ensureVector.Rd
+7e122096fda8f0ea10e58791512c7103 *man/explode.Rd
+3a02c1f0adc34f965f337dbb06e90b33 *man/extractSubList.Rd
+86e648c250b594f79ae3f790a2c81f47 *man/filterNull.Rd
+e8bd84f8c0d9236d4ac4a7f9077e95f9 *man/getAttributeNames.Rd
+568ffd17ea296f904b448eaa422b6134 *man/getClass1.Rd
+ae4a26b6b975ec9320409d5a2b4fa5e3 *man/getFirst.Rd
+c1ef682279fdafc42035e5ae98a335d0 *man/getMaxIndex.Rd
+52fb8af09d83db61beb91f142861545a *man/getMaxIndexOfRows.Rd
+f0bc46eeace604912b11a07eed6dc4dd *man/getOperatingSystem.Rd
+5c0f12f2f104ba468f03df1173697555 *man/getRelativePath.Rd
+7088382748af407613f70062bfe373c8 *man/getUnixTime.Rd
+933e49ff2ad1b3ce0cf1098e22742f8b *man/getUsedFactorLevels.Rd
+b8500725bf2e8028046335d5125deee9 *man/hasAttributes.Rd
+6d0b9d6b8ccaa03188bd81f2b7c19736 *man/insert.Rd
+6634b6ba32289309bdb280b17754e5da *man/is.error.Rd
+e053f4d78028bc90ac4d5261751e1519 *man/isDirectory.Rd
+15062d75a87dd8c79d4223aa1bf8d7cc *man/isEmptyDirectory.Rd
+cc74837c76b9acffd8f451fffedb0e88 *man/isExpensiveExampleOk.Rd
+c2626041e024ab6e1b9270779f504c9c *man/isFALSE.Rd
+812b51ba8bff7fb434c8767254fafac1 *man/isProperlyNamed.Rd
+5c2ac4658cce20d84735755c268fe5b4 *man/isScalarNA.Rd
+ce1283580e4ab42a3b3b0a0bb3c9f707 *man/isScalarValue.Rd
+98e7569197bb7aa1c54ae02fc6ccfa84 *man/isSubset.Rd
+1367a2c184ad4b1d38ea777a81ca1aa0 *man/isSuperset.Rd
+4dbd43142e4a0672ed27bf4d2cf9f137 *man/isValidName.Rd
+eefed4a9f351b4f28ef202c54578da25 *man/itostr.Rd
+33130226711c45197c442fde3d3e708b *man/lib.Rd
+1a23b178b10a2aff3c7e9a2fb2925946 *man/load2.Rd
+f646c046dacd2509467ff8fcf67e15bf *man/lsort.Rd
+67652ff11e5a1e0cd8930575af6684fc *man/makeDataFrame.Rd
+8a20556349d0cae1ea5ad65b1139b304 *man/makeFileCache.Rd
+470ef430fb3b9d713101670bdb0658ea *man/makeProgressBar.Rd
+b17c11eb3897f4b1d1d7e04b20a4d1db *man/makeS3Obj.Rd
+ed4fb2d1843c868b1dcffa9226d87bbf *man/makeSimpleFileLogger.Rd
+000a414962a93227cef7b9de4c53a7f5 *man/mapValues.Rd
+6afb888f9cdb5e6cfaaf9305e3580fa4 *man/messagef.Rd
+2c42698177f543d5f6ed9d476f824a54 *man/namedList.Rd
+e801c4052ef57ad15ac715fe03e42ce4 *man/names2.Rd
+e38f27ff8b6d7908a0f343869ac02121 *man/nin.Rd
+5e162897c4e59ee8e78e804c162a5177 *man/normalize.Rd
+57f7aa328416d046e0c7c53867f0e1af *man/optimizeSubInts.Rd
+200f93af67217109bc5d96a972f2d382 *man/pause.Rd
+a77650e2b172d62a00175dba1998b3b3 *man/printHead.Rd
+def3d4bd73c03e2beaa10eb4ac3d90e6 *man/printStrToChar.Rd
+b746f7d076ee8bbf262045598d1e0c93 *man/printToChar.Rd
+566e359ac2c537ec596f04fe7ae60c5c *man/rangeVal.Rd
+566cceb8d9b415fdd6c566c4ffde5825 *man/requirePackages.Rd
+83b3a03f404196ae20e0f77c6846a0d2 *man/rowLapply.Rd
+3dc776fe282e183acc491113ddd21635 *man/save2.Rd
+588a5689abd98cee7b6f5909cbd9a8c2 *man/seq_row.Rd
+4934d86586c7c5d5f4ef3e59276e640f *man/setAttribute.Rd
+40d688ce7711cdb3baf368f13d5ff6f9 *man/setClasses.Rd
+e326f0b3e3f1b8479192c2d19d93519d *man/setRowNames.Rd
+e4980402c9b54b5a26c91a9d44e01e20 *man/setValue.Rd
+e2fd14318a64c56f341c70937d4ff7f3 *man/sortByCol.Rd
+b49fae70e5c6838bb4828022291ed8f5 *man/splitPath.Rd
+2695e2895e25d9ec8ace337e078a4f19 *man/splitTime.Rd
+1844bcfaff40c31df958a1b704f986b4 *man/stopf.Rd
+f4fd3608f7c6643ad781b0eade1c99b9 *man/strrepeat.Rd
+141b165558a6d614d090366b09678b41 *man/suppressAll.Rd
+f6bee86c6523ab7bf97570857d7ac382 *man/symdiff.Rd
+3a398cc05a7fcba5e424b9aa8d95cbf3 *man/system3.Rd
+63fadbc0b67a390557c1fa71e0b47c04 *man/toRangeStr.Rd
+8b2bbcf1ce876b03038b5bad684d9b63 *man/vlapply.Rd
+1ade9fce05841b9e87828dd24f26aa6b *man/warningf.Rd
+643a7c30b3a30ff5dd09fb9bd489e664 *man/which.first.Rd
 35b942e80b674462ff4f0c26c0c26d7d *src/getMaxColRowIndex.c
 12c0f6eb710ca0bc0b6e4353030258b4 *src/getMaxColRowIndex.h
 872c1ed132a63360b520d7edcb241d61 *src/getMaxIndex.c
 e41e18c0f5bfc66b2ce50da59cb0919c *src/getMaxIndex.h
+6afb60627d891c89f4b585da2621384a *src/init.c
 83957d4a67abf8f6b3f399b2d3c96cc1 *src/itostr.c
 845d1f74188f0aefe4bab9ec2e0efc3f *src/itostr.h
 6afff632678c787e398d5b43e72241ed *src/macros.h
@@ -216,15 +219,15 @@ e336b47dfd43383a09d279b77e4f96c3 *tests/testthat/test_clipString.R
 dd9dc2ccdece4005ed5358ced398cf13 *tests/testthat/test_computeMode.R
 7448827f4c9fabbae92a5864d18f2ac9 *tests/testthat/test_convertDataFrameCols.R
 66258ce1820608dcd2e5616b00e8aad0 *tests/testthat/test_convertInteger.R
-77fdfcaf7252093ae760539337f479fa *tests/testthat/test_convertListOfRowsToDataFrame.R
+c4708629c6140fc8d41028f70c416a74 *tests/testthat/test_convertListOfRowsToDataFrame.R
 330977ab6ed531b93bdad0fcbd8a6533 *tests/testthat/test_convertMatrixType.R
 02bc23580f983e1a98ee7dad92c081fe *tests/testthat/test_convertRowsToList.R
-8422c8f8a2f573c6e361c84e5e5dd61b *tests/testthat/test_convertToShortString.R
+07eea9b1884c60af8ebf5d58695b0d8d *tests/testthat/test_convertToShortString.R
 c8ca5f9dc69b06b88f920dad74143ff3 *tests/testthat/test_dapply.R
 2730cd895f1362a22eb2c38fc71a2b66 *tests/testthat/test_directory.R
 ee1696434054a3b1c40ae3ba2b2af9be *tests/testthat/test_do.call2.R
 e8bf0877b50ec0059a0aefb098f1791f *tests/testthat/test_dropNamed.R
-c833f182f3f91bd22b2fc718b664d138 *tests/testthat/test_ensureVector.R
+e1c667e3b3ee0944d81f35d7b927faa6 *tests/testthat/test_ensureVector.R
 1733a18def47e4f99263c0ec22a05ae9 *tests/testthat/test_explode.R
 8399154accb6dffa48c7d06c1e69f9ae *tests/testthat/test_extractSubList.R
 5db66dab33cc917d87ccdd03ba721c42 *tests/testthat/test_factor.R
@@ -233,7 +236,7 @@ d457e05b43fd367fcebcfdd08eeafa7c *tests/testthat/test_filterNull.R
 729762bd8e29cb1f33e538d13ca899f4 *tests/testthat/test_getClass1.R
 38e58da0e7a723f99dbba1fbd6120143 *tests/testthat/test_getFirstLast.R
 9d2ca5a6feeaef8f88698c61995808d8 *tests/testthat/test_getMaxColRowIndex.R
-03ab4c90b42903b9c9d6500384249457 *tests/testthat/test_getMaxIndex.R
+cfa5011c1847ba73248cebef105aa86f *tests/testthat/test_getMaxIndex.R
 6a30e242cbbd9a6b5c1eada247875f8d *tests/testthat/test_getOperatingSystem.R
 6f3259098fab9dfee2e8827ea4d54a30 *tests/testthat/test_getRelativePath.R
 511082684bfa9447f2ffabe4c5ebd25d *tests/testthat/test_getUnixTime.R
@@ -254,10 +257,11 @@ b1ab421f949e43a571b3b65acd96d1b2 *tests/testthat/test_makeDataFrame.R
 1bb67fc1ef119c4e78324bfafe1de1b5 *tests/testthat/test_makeProgressBar.R
 470defa91aab0e97dbccbd931924047c *tests/testthat/test_makeSimpleFileLogger.R
 2181619d625795bb64ba88ce2b84de2d *tests/testthat/test_mapValues.R
-1130be95adf737b30a0c4c783648e973 *tests/testthat/test_namedList.R
+2219a229eb487a67c9d240deea531e11 *tests/testthat/test_namedList.R
 d06ec9a9e27677e23f8a9d8fd030748e *tests/testthat/test_nin.R
 d937f2e0f11346490140f08998bcbff1 *tests/testthat/test_normalize.R
 98a1a85a55a68773c748dab8f4f0ad40 *tests/testthat/test_optimizeSubInts.R
+4f8e94cf1ba14b637aeb4e62a008d27e *tests/testthat/test_printHead.R
 4ec4fcdd19c7734b29a9107d85c8f4fe *tests/testthat/test_printStrToChar.R
 edc7badddfe9bd1c8fe1fb0a77901d16 *tests/testthat/test_printToChar.R
 77530a85391710d9f2eedd2d9fc87e4c *tests/testthat/test_printf.R
diff --git a/NAMESPACE b/NAMESPACE
index eac4eb6..37642e6 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -39,6 +39,7 @@ export(explode)
 export(extractSubList)
 export(filterNull)
 export(getAttributeNames)
+export(getBestIndex)
 export(getClass1)
 export(getFirst)
 export(getLast)
@@ -92,6 +93,7 @@ export(names2)
 export(normalize)
 export(optimizeSubInts)
 export(pause)
+export(printHead)
 export(printStrToChar)
 export(printToChar)
 export(rangeVal)
diff --git a/NEWS b/NEWS
index b4ae9c9..1b48682 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,15 @@
-BBmisc_1.10: 
+BBmisc_1.11: 2017-03-09
+- convertToShortString now also prints the content of expressions, and prints NULL like <NULL>
+- The function checkArg is superseded by the package checkmate. Please use
+  checkmate instead.
+- ensureVector now can be passed multiple classes via cl parameter
+- New argument ensure.list for ensureVector
+
+- new functions
+-- printHead
+-- getBestIndex
+
+BBmisc_1.10: 2016-07-12
 - New argument min.versions for requirePackages
 
 BBmisc_1.9: 2015-02-03
@@ -9,7 +20,6 @@ BBmisc_1.9: 2015-02-03
 - new functions
 -- mapValues
 
-
 BBmisc_1.8: 2014-10-30
 - Options for the ProgressBar can now be directly passed to the constructor.
 - Fixed smaller bugs in normalize
@@ -153,4 +163,3 @@ BBmisc_1.0-77: 17-Mar-2012
 
 BBmisc_1.0-58: 05-Jan-2012
 - First submit to CRAN.
-
diff --git a/R/addClasses.R b/R/addClasses.R
index 652652c..51094c9 100644
--- a/R/addClasses.R
+++ b/R/addClasses.R
@@ -8,7 +8,10 @@
 #' @return Changed object \code{x}.
 #' @export
 #' @examples
-#' addClasses(list(), c("foo1", "foo2"))
+#' x = list()
+#' print(class(x))
+#' x = addClasses(x, c("foo1", "foo2"))
+#' print(class(x))
 addClasses = function(x, classes) {
   class(x) = c(classes, class(x))
   x
diff --git a/R/checkArg.R b/R/checkArg.R
index 24e39f6..cb6b34d 100644
--- a/R/checkArg.R
+++ b/R/checkArg.R
@@ -1,7 +1,10 @@
-#' Check for a function argument.
+#' @title Check for a function argument.
 #'
-#' Throws exception if checks are not passed.
-#' Note that argument is evaluated when checked.
+#' @description
+#' Throws exception if checks are not passed. Note that argument is evaluated when checked.
+#'
+#' This function is superseded by the package \pkg{checkmate} and might get deprecated
+#' in the future. Please
 #'
 #' @param x [any]\cr
 #'   Argument.
@@ -46,19 +49,6 @@
 #'   Default is missing.
 #' @return Nothing.
 #' @export
-#' @examples
-#' x = 1L
-#' checkArg(x, "integer", len = 1, na.ok = FALSE, upper = 3L)
-#' x = as.integer(NA)
-#' checkArg(x, "integer", len = 1, na.ok = TRUE)
-#' x = c("foo", "bar")
-#' checkArg(x, "character")
-#' x = "foo"
-#' checkArg(x, choices = c("foo", "bar"))
-#' x = c("foo", "bar")
-#' checkArg(x, subset = c("foo", "bar"))
-#' fun = function(foo, bar)
-#' checkArg(fun, formals = c("foo", "bar"))
 checkArg = function(x, cl, s4 = FALSE, len, min.len, max.len, choices, subset, lower = NA, upper = NA, na.ok = TRUE, formals) {
   s = deparse(substitute(x))
   if (missing(x))
diff --git a/R/coalesce.R b/R/coalesce.R
index fdc1240..8a72532 100644
--- a/R/coalesce.R
+++ b/R/coalesce.R
@@ -1,7 +1,11 @@
-#' Returns first non-missing, non-null argument.
+#' @title Returns first non-missing, non-null argument.
 #'
-#' Returns first non-missing, non-null argument, otherwise
-#' \code{NULL}.
+#' @description
+#' Returns first non-missing, non-null argument, otherwise \code{NULL}.
+#'
+#' We have to perform some pretty weird \code{\link{tryCatch}} stuff internally,
+#' so you should better not pass complex function calls into the arguments that can throw exceptions,
+#' as these will be completely muffled, and return \code{NULL} in the end.
 #'
 #' @param ... [any]\cr
 #'   Arguments.
@@ -15,15 +19,13 @@
 coalesce = function(...) {
   dots = match.call(expand.dots = FALSE)$...
   for (arg in dots) {
-    is_missing = if (is.symbol(arg)) {
-      eval(substitute(missing(symbol), list(symbol = arg)),
-           envir = parent.frame())
+    ismissing = if (is.symbol(arg)) {
+      eval(substitute(missing(symbol), list(symbol = arg)), envir = parent.frame())
     } else {
       FALSE
     }
-    if (!is_missing) {
-      value = tryCatch(eval(arg, envir = parent.frame()),
-                       error = function(...) NULL)
+    if (!ismissing) {
+      value = tryCatch(eval(arg, envir = parent.frame()), error = function(...) NULL)
       if (!is.null(value)) {
         return(value)
       }
diff --git a/R/convertListOfRowsToDataFrame.R b/R/convertListOfRowsToDataFrame.R
index d9661b9..52a56c4 100644
--- a/R/convertListOfRowsToDataFrame.R
+++ b/R/convertListOfRowsToDataFrame.R
@@ -1,12 +1,14 @@
-#' Convert a list of row-vectors of equal structure to a data.frame.
+#' @title Convert a list of row-vector of equal structure to a data.frame.
 #'
+#' @description
 #' Elements are arranged in columns according to their name in each
-#' element of \code{rows}. Missing values are filled using NAs.
+#' element of \code{rows}.
+#' Variables that are not present in some row-lists, or encoded as \code{NULL}, are filled using NAs.
 #'
 #' @param rows [\code{list}]\cr
-#'   List of rows. Each row is a list or vector of the same structure.
-#'   That means all rows must have the same length and all corresponding elements must have the
-#'   same class.
+#'   List of rows. Each row is a list or vector of the same structure,
+#'   where all corresponding elements must have the same class.
+#'   It is allowed that in some rows some elements are not present, see above.
 #' @param strings.as.factors [\code{logical(1)}]\cr
 #'   Convert character columns to factors?
 #'   Default is \code{default.stringsAsFactors()}.
diff --git a/R/convertToShortString.R b/R/convertToShortString.R
index e3a713d..7f5e77f 100644
--- a/R/convertToShortString.R
+++ b/R/convertToShortString.R
@@ -5,13 +5,14 @@
 #' Numerics are formated with \code{num.format}.
 #' If of length greater than 1, they are collapsed witd \dQuote{,} and clipped.
 #' so they do not become excessively long.
+#' Expressions will be converted to plain text.
 #'
 #' All others: Currently, only their class is simply printed
 #' like \dQuote{<data.frame>}.
 #'
 #' Lists: The mechanism above is applied (non-recursively) to their elements.
 #' The result looks like this:
-#' \dQuote{a = 1, <unamed> = 2, b = <data.frame>, c = <list>}.
+#' \dQuote{a=1, <unamed>=2, b=<data.frame>, c=<list>}.
 #'
 #' @param x [any]\cr
 #'   The object.
@@ -29,22 +30,23 @@ convertToShortString = function(x, num.format = "%.4g", clip.len = 15L) {
 
   # convert non-list object to string
   convObj = function(x) {
-    if (is.null(x))
-      return("NULL")
-    if (is.atomic(x)) {
-      if (length(x) == 0L) {
+    cl = getClass1(x)
+    string = 
+      if (is.atomic(x) && !is.null(x) && length(x) == 0L)
         sprintf("%s(0)", getClass1(x))
-      } else if (length(x) == 1L) {
-        if (is.double(x))
-          sprintf(num.format, x)
-        else
-          collapse(x)
-      } else {
-        clipString(collapse(sapply(x, convertToShortString), ","), clip.len)
-      }
-    } else {
-      paste("<", getClass1(x), ">", sep = "")
-    }
+      else if (cl == "numeric")
+        paste(sprintf(num.format, x), collapse=",")
+      else if (cl == "integer")
+        paste(as.character(x), collapse=",")
+      else if (cl == "logical")
+        paste(as.character(x), collapse=",")
+      else if (cl == "character")
+        collapse(x)
+      else if (cl == "expression")
+        as.character(x)
+      else
+        sprintf("<%s>", cl)
+    string = clipString(string, clip.len)
   }
 
   # handle only lists and not any derived data types
diff --git a/R/ensureVector.R b/R/ensureVector.R
index 4228d35..68a78b3 100644
--- a/R/ensureVector.R
+++ b/R/ensureVector.R
@@ -5,31 +5,39 @@
 #'
 #' @param x [any]\cr
 #'   Input element.
-#' @param n [\code{integer}]\cr
+#' @param n [\code{integer(1)}]\cr
 #'   Desired length.
-#' @param cl [\code{character(1)}*]\cr
-#'   Only do the operation if \code{x} inherits from this class, otherwise simply let x pass.
+#'   Default is 1 (the most common case).
+#' @param cl [\code{character}*]\cr
+#'   Only do the operation if \code{x} inherits from this one of these classes,
+#'   otherwise simply let \code{x} pass.
 #'   Default is \code{NULL} which means to always do the operation.
 #' @param names [\code{character}*] \cr
 #'   Names for result.
 #'   Default is \code{NULL}, which means no names.
+#' @param ensure.list [\code{logical(1)}]\cr
+#'   Should \code{x} be wrapped in a list in any case?
+#'   Default is \code{FALSE}, i.e., if \code{x} is a scalar value, a vector is
+#'   returned.
 #' @return Ether a vector or list of length \code{n} with replicated \code{x} or \code{x} unchanged..
 #' @export
-ensureVector = function(x, n, cl = NULL, names = NULL) {
+ensureVector = function(x, n = 1L, cl = NULL, names = NULL, ensure.list = FALSE) {
   n = convertInteger(n)
   assertCount(n)
+  assertFlag(ensure.list)
 
   doit = isScalarValue(x) || !is.atomic(x)
   if (!is.null(cl)) {
-    assertString(cl)
+    assertCharacter(cl, min.len = 1L, any.missing = FALSE, all.missing = FALSE)
     doit = doit && inherits(x, cl)
   }
 
   if (doit) {
-    if (isScalarValue(x))
+    if (isScalarValue(x) && !ensure.list) {
       xs = rep(x, n)
-    else
+    } else {
       xs = replicate(n, x, simplify = FALSE)
+    }
 
     if (!is.null(names)) {
       assertCharacter(names, len = n, any.missing = FALSE)
diff --git a/R/getMaxIndex.R b/R/getMaxIndex.R
index 3aef7e9..f468919 100644
--- a/R/getMaxIndex.R
+++ b/R/getMaxIndex.R
@@ -1,8 +1,12 @@
-#' Return index of maximal/minimal element in numerical vector.
+#' Return index of maximal/minimal/best element in numerical vector.
 #'
 #' If \code{x} is empty or only contains NAs which are to be removed,
 #' -1 is returned.
 #'
+#' @note
+#' Function \code{getBestIndex} is a simple wrapper for \code{getMinIndex} or
+#' \code{getMaxIndex} respectively depending on the argument \code{minimize}.
+#'
 #' @param x [\code{numeric}]\cr
 #'   Input vector.
 #' @param ties.method [\code{character(1)}]\cr
@@ -13,6 +17,11 @@
 #'   If \code{FALSE}, NA is returned if an NA is encountered in \code{x}.
 #'   If \code{TRUE}, NAs are disregarded.
 #'   Default is \code{FALSE}
+#' @param minimize [\code{logical(1)}]\cr
+#'   Minimal element is considered best?
+#'   Default is \code{TRUE}.
+#' @param ... [any]\cr
+#'   Further arguments passed down to the delegate.
 #' @return [\code{integer(1)}].
 #' @export
 #' @useDynLib BBmisc c_getMaxIndex
@@ -29,3 +38,12 @@ getMaxIndex = function(x, ties.method = "random", na.rm = FALSE) {
 getMinIndex = function(x, ties.method = "random", na.rm = FALSE) {
   getMaxIndex(-as.numeric(x), ties.method, na.rm)
 }
+
+
+#' @export
+#' @rdname getMaxIndex
+getBestIndex = function(x, minimize = TRUE, ...) {
+  assertFlag(minimize)
+  getIndex = if (minimize) getMinIndex else getMaxIndex
+  getIndex(x, ...)
+}
diff --git a/R/matchDataFrameSubset.R b/R/matchDataFrameSubset.R
index 96378ee..89147e6 100644
--- a/R/matchDataFrameSubset.R
+++ b/R/matchDataFrameSubset.R
@@ -1,7 +1,7 @@
 # FIXME: not used anywhere?
 matchDataFrameSubset = function(df, ss, factors.as.chars = TRUE) {
-  checkArg(df, c("list", "data.frame"))
-  checkArg(ss, c("list", "data.frame"))
+  # checkArg(df, c("list", "data.frame"))
+  # checkArg(ss, c("list", "data.frame"))
   if (!isProperlyNamed(df))
     stop("'df' is not proberbly named")
   if (!isProperlyNamed(ss))
diff --git a/R/namedList.R b/R/namedList.R
index 049d24e..e07b2b0 100644
--- a/R/namedList.R
+++ b/R/namedList.R
@@ -1,4 +1,7 @@
-#' Create named list, possibly initialized with a certain element.
+#' @title Create named list, possibly initialized with a certain element.
+#'
+#' @description
+#' Even an empty list will always be named.
 #'
 #' @param names [\code{character}]\cr
 #'   Names of elements.
@@ -12,7 +15,7 @@
 #' namedList(c("a", "b"), init = 1)
 namedList = function(names, init) {
   if (missing(names))
-    return(list())
+    return(setNames(list(), character(0L)))
   n = length(names)
   if (missing(init))
     xs = vector("list", n)
diff --git a/R/printHead.R b/R/printHead.R
new file mode 100644
index 0000000..4a90f2a
--- /dev/null
+++ b/R/printHead.R
@@ -0,0 +1,23 @@
+#' More meaningful \code{head(df)} output.
+#'
+#' The behaviour is similar to \code{print(head(x, n))}. The difference is, that if
+#' the number of rows in a data.frame/matrix or the number of elements in a list
+#' or vector is larger than \code{n}, additional information is printed about
+#' the total number of rows or elements respectively.
+#'
+#' @param x [\code{data.frame} | \code{matrix} | \code{list} | \code{vector}]\cr
+#'   Object.
+#' @param n [\code{integer(1)}]\cr
+#'   Single positive integer: number of rows for a matrix/data.frame or number of
+#'   elements for vectors/lists respectively.
+#' @return Nothing.
+#' @export
+printHead = function(x, n = 6L) {
+  assertCount(n, positive = TRUE)
+  print(head(x, n = n))
+  if ((is.data.frame(x) || is.matrix(x)) && nrow(x) > n)
+    catf("... (#rows: %i, #cols: %i)", nrow(x), ncol(x))
+  else if (length(x) > n)
+    catf("... (#elements: %i)", length(x))
+  invisible(NULL)
+}
diff --git a/man/addClasses.Rd b/man/addClasses.Rd
index cec3901..d27ae7b 100644
--- a/man/addClasses.Rd
+++ b/man/addClasses.Rd
@@ -20,6 +20,8 @@ Changed object \code{x}.
 A wrapper to add to the class attribute.
 }
 \examples{
-addClasses(list(), c("foo1", "foo2"))
+x = list()
+print(class(x))
+x = addClasses(x, c("foo1", "foo2"))
+print(class(x))
 }
-
diff --git a/man/argsAsNamedList.Rd b/man/argsAsNamedList.Rd
index b69889b..44894b6 100644
--- a/man/argsAsNamedList.Rd
+++ b/man/argsAsNamedList.Rd
@@ -20,4 +20,3 @@ Missing names will be set to \code{NA}.
 z = 3
 argsAsNamedList(x = 1, y = 2, z)
 }
-
diff --git a/man/asMatrixCols.Rd b/man/asMatrixCols.Rd
index 4880b84..135c701 100644
--- a/man/asMatrixCols.Rd
+++ b/man/asMatrixCols.Rd
@@ -27,4 +27,3 @@ Default is to take the names of the elements of \code{xs}.}
 \description{
 Extracts a named element from a list of lists.
 }
-
diff --git a/man/asQuoted.Rd b/man/asQuoted.Rd
index a4081ca..2824a7b 100644
--- a/man/asQuoted.Rd
+++ b/man/asQuoted.Rd
@@ -24,4 +24,3 @@ Works the same as if you would have entered the expression and called
 \examples{
 asQuoted("x == 3")
 }
-
diff --git a/man/binPack.Rd b/man/binPack.Rd
index ad5056d..ea5b3a0 100644
--- a/man/binPack.Rd
+++ b/man/binPack.Rd
@@ -34,4 +34,3 @@ xs = split(x, bp)
 print(xs)
 print(sapply(xs, sum))
 }
-
diff --git a/man/btwn.Rd b/man/btwn.Rd
index 8d71f14..ce0f91b 100644
--- a/man/btwn.Rd
+++ b/man/btwn.Rd
@@ -24,4 +24,3 @@ x = 3
 y = c(-1,2,5)
 x \%btwn\% y
 }
-
diff --git a/man/cFactor.Rd b/man/cFactor.Rd
index 0923b1b..9bbb0f2 100644
--- a/man/cFactor.Rd
+++ b/man/cFactor.Rd
@@ -23,4 +23,3 @@ f2 = factor(c("b", "c"))
 print(c(f1, f2))
 print(cFactor(f1, f2))
 }
-
diff --git a/man/capitalizeStrings.Rd b/man/capitalizeStrings.Rd
index 64eb148..b7cb1db 100644
--- a/man/capitalizeStrings.Rd
+++ b/man/capitalizeStrings.Rd
@@ -29,4 +29,3 @@ capitalizeStrings(c("the taIl", "wags The dOg", "That looks fuNny!"))
 capitalizeStrings(c("the taIl", "wags The dOg", "That looks fuNny!")
 , all.words = TRUE, lower.back = TRUE)
 }
-
diff --git a/man/catf.Rd b/man/catf.Rd
index a60164d..dbcdce8 100644
--- a/man/catf.Rd
+++ b/man/catf.Rd
@@ -32,4 +32,3 @@ A simple wrapper for \code{cat(sprintf(...))}.
 msg = "a message."
 catf("This is \%s", msg)
 }
-
diff --git a/man/checkArg.Rd b/man/checkArg.Rd
index 9aacc6a..54b6250 100644
--- a/man/checkArg.Rd
+++ b/man/checkArg.Rd
@@ -65,21 +65,8 @@ Default is missing.}
 Nothing.
 }
 \description{
-Throws exception if checks are not passed.
-Note that argument is evaluated when checked.
-}
-\examples{
-x = 1L
-checkArg(x, "integer", len = 1, na.ok = FALSE, upper = 3L)
-x = as.integer(NA)
-checkArg(x, "integer", len = 1, na.ok = TRUE)
-x = c("foo", "bar")
-checkArg(x, "character")
-x = "foo"
-checkArg(x, choices = c("foo", "bar"))
-x = c("foo", "bar")
-checkArg(x, subset = c("foo", "bar"))
-fun = function(foo, bar)
-checkArg(fun, formals = c("foo", "bar"))
-}
+Throws exception if checks are not passed. Note that argument is evaluated when checked.
 
+This function is superseded by the package \pkg{checkmate} and might get deprecated
+in the future. Please
+}
diff --git a/man/checkListElementClass.Rd b/man/checkListElementClass.Rd
index 24730cd..d799851 100644
--- a/man/checkListElementClass.Rd
+++ b/man/checkListElementClass.Rd
@@ -25,4 +25,3 @@ Note that argument is evaluated when checked.
 xs = as.list(1:3)
 checkListElementClass(xs, "numeric")
 }
-
diff --git a/man/chunk.Rd b/man/chunk.Rd
index e341d00..04ec14e 100644
--- a/man/chunk.Rd
+++ b/man/chunk.Rd
@@ -46,4 +46,3 @@ chunk(xs, n.chunks = 2)
 chunk(xs, n.chunks = 2, shuffle = TRUE)
 chunk(xs, props = c(7, 3))
 }
-
diff --git a/man/clipString.Rd b/man/clipString.Rd
index e1e1c28..531768f 100644
--- a/man/clipString.Rd
+++ b/man/clipString.Rd
@@ -28,4 +28,3 @@ Shortens strings to a given length.
 print(clipString("abcdef", 10))
 print(clipString("abcdef", 5))
 }
-
diff --git a/man/coalesce.Rd b/man/coalesce.Rd
index b854624..6c5a2fb 100644
--- a/man/coalesce.Rd
+++ b/man/coalesce.Rd
@@ -14,8 +14,11 @@ Arguments.}
 [any].
 }
 \description{
-Returns first non-missing, non-null argument, otherwise
-\code{NULL}.
+Returns first non-missing, non-null argument, otherwise \code{NULL}.
+
+We have to perform some pretty weird \code{\link{tryCatch}} stuff internally,
+so you should better not pass complex function calls into the arguments that can throw exceptions,
+as these will be completely muffled, and return \code{NULL} in the end.
 }
 \examples{
 f = function(x,y) {
@@ -23,4 +26,3 @@ f = function(x,y) {
 }
 f(y = 3)
 }
-
diff --git a/man/collapse.Rd b/man/collapse.Rd
index ba56687..1e5d756 100644
--- a/man/collapse.Rd
+++ b/man/collapse.Rd
@@ -24,4 +24,3 @@ A simple wrapper for \code{paste(x, collapse)}.
 collapse(c("foo", "bar"))
 collapse(c("foo", "bar"), sep = ";")
 }
-
diff --git a/man/collapsef.Rd b/man/collapsef.Rd
index 56d445d..500eb5b 100644
--- a/man/collapsef.Rd
+++ b/man/collapsef.Rd
@@ -22,4 +22,3 @@ A simple wrapper for \code{collapse(sprintf, ...)}.
 \details{
 Useful for vectorized call to \code{\link{sprintf}}.
 }
-
diff --git a/man/computeMode.Rd b/man/computeMode.Rd
index 8543a3d..d4f5d19 100644
--- a/man/computeMode.Rd
+++ b/man/computeMode.Rd
@@ -30,4 +30,3 @@ The implementation is currently not extremely efficient.
 \examples{
 computeMode(c(1,2,3,3))
 }
-
diff --git a/man/convertDataFrameCols.Rd b/man/convertDataFrameCols.Rd
index e5a6c35..bea3fbf 100644
--- a/man/convertDataFrameCols.Rd
+++ b/man/convertDataFrameCols.Rd
@@ -33,4 +33,3 @@ Default is \code{FALSE}.}
 \description{
 Converts columns in a data frame to characters, factors or numerics.
 }
-
diff --git a/man/convertInteger.Rd b/man/convertInteger.Rd
index 4804949..ac5dd78 100644
--- a/man/convertInteger.Rd
+++ b/man/convertInteger.Rd
@@ -24,4 +24,3 @@ str(convertInteger(1.3))
 str(convertInteger(c(1.0, 2.0)))
 str(convertInteger("foo"))
 }
-
diff --git a/man/convertIntegers.Rd b/man/convertIntegers.Rd
index 2890665..57bd391 100644
--- a/man/convertIntegers.Rd
+++ b/man/convertIntegers.Rd
@@ -25,4 +25,3 @@ str(convertIntegers(1.3))
 str(convertIntegers(c(1.0, 2.0)))
 str(convertIntegers("foo"))
 }
-
diff --git a/man/convertListOfRowsToDataFrame.Rd b/man/convertListOfRowsToDataFrame.Rd
index 49c3420..748d8f2 100644
--- a/man/convertListOfRowsToDataFrame.Rd
+++ b/man/convertListOfRowsToDataFrame.Rd
@@ -2,16 +2,16 @@
 % Please edit documentation in R/convertListOfRowsToDataFrame.R
 \name{convertListOfRowsToDataFrame}
 \alias{convertListOfRowsToDataFrame}
-\title{Convert a list of row-vectors of equal structure to a data.frame.}
+\title{Convert a list of row-vector of equal structure to a data.frame.}
 \usage{
 convertListOfRowsToDataFrame(rows,
   strings.as.factors = default.stringsAsFactors(), row.names, col.names)
 }
 \arguments{
 \item{rows}{[\code{list}]\cr
-List of rows. Each row is a list or vector of the same structure.
-That means all rows must have the same length and all corresponding elements must have the
-same class.}
+List of rows. Each row is a list or vector of the same structure,
+where all corresponding elements must have the same class.
+It is allowed that in some rows some elements are not present, see above.}
 
 \item{strings.as.factors}{[\code{logical(1)}]\cr
 Convert character columns to factors?
@@ -30,9 +30,9 @@ By default the names of an element of \code{rows} are taken.}
 }
 \description{
 Elements are arranged in columns according to their name in each
-element of \code{rows}. Missing values are filled using NAs.
+element of \code{rows}.
+Variables that are not present in some row-lists, or encoded as \code{NULL}, are filled using NAs.
 }
 \examples{
 convertListOfRowsToDataFrame(list(list(x = 1, y = "a"), list(x = 2, y = "b")))
 }
-
diff --git a/man/convertMatrixType.Rd b/man/convertMatrixType.Rd
index f4109bf..7ed3c82 100644
--- a/man/convertMatrixType.Rd
+++ b/man/convertMatrixType.Rd
@@ -22,4 +22,3 @@ Works by setting \code{\link{mode}}.
 \note{
 \code{as.mytype} drops dimension when used on a matrix.
 }
-
diff --git a/man/convertRowsToList.Rd b/man/convertRowsToList.Rd
index 00e34b3..2268c64 100644
--- a/man/convertRowsToList.Rd
+++ b/man/convertRowsToList.Rd
@@ -1,8 +1,8 @@
 % Generated by roxygen2: do not edit by hand
 % Please edit documentation in R/convertRowsToList.R
 \name{convertRowsToList}
-\alias{convertColsToList}
 \alias{convertRowsToList}
+\alias{convertColsToList}
 \title{Convert rows (columns) of data.frame or matrix to lists.}
 \usage{
 convertRowsToList(x, name.list = TRUE, name.vector = FALSE,
@@ -39,4 +39,3 @@ Default is \code{TRUE}.}
 For each row, one list/vector is constructed, each entry of
 the row becomes a list/vector element.
 }
-
diff --git a/man/convertToShortString.Rd b/man/convertToShortString.Rd
index a3a0033..3d657a5 100644
--- a/man/convertToShortString.Rd
+++ b/man/convertToShortString.Rd
@@ -26,15 +26,15 @@ Atomics: If of length 0 or 1, they are basically printed as they are.
 Numerics are formated with \code{num.format}.
 If of length greater than 1, they are collapsed witd \dQuote{,} and clipped.
 so they do not become excessively long.
+Expressions will be converted to plain text.
 
 All others: Currently, only their class is simply printed
 like \dQuote{<data.frame>}.
 
 Lists: The mechanism above is applied (non-recursively) to their elements.
 The result looks like this:
-\dQuote{a = 1, <unamed> = 2, b = <data.frame>, c = <list>}.
+\dQuote{a=1, <unamed>=2, b=<data.frame>, c=<list>}.
 }
 \examples{
 convertToShortString(list(a = 1, b = NULL, "foo", c = 1:10))
 }
-
diff --git a/man/dapply.Rd b/man/dapply.Rd
index 17b086f..630c5fe 100644
--- a/man/dapply.Rd
+++ b/man/dapply.Rd
@@ -29,4 +29,3 @@ and combines the results as \code{data.frame} columns.
 The results will get replicated to have equal length
 if necessary and possible.
 }
-
diff --git a/man/deprecated.Rd b/man/deprecated.Rd
index c7fddb8..0dc3e12 100644
--- a/man/deprecated.Rd
+++ b/man/deprecated.Rd
@@ -1,8 +1,8 @@
 % Generated by roxygen2: do not edit by hand
 % Please edit documentation in R/zzz_deprecated.R
 \name{deprecated}
-\alias{convertDfCols}
 \alias{deprecated}
+\alias{convertDfCols}
 \alias{listToShortString}
 \title{Deprecated function. Do not use!}
 \usage{
@@ -31,4 +31,3 @@ listToShortString(x, num.format = "\%.4g", clip.len = 15L)
 \description{
 Deprecated function. Do not use!
 }
-
diff --git a/man/do.call2.Rd b/man/do.call2.Rd
index 97bb930..bef2b83 100644
--- a/man/do.call2.Rd
+++ b/man/do.call2.Rd
@@ -33,4 +33,3 @@ to avoid a copy.
   microbenchmark(do.call(head, list(x, n = 1)), do.call2("head", x, n = 1))
 }
 }
-
diff --git a/man/dropNamed.Rd b/man/dropNamed.Rd
index 160c551..d62de54 100644
--- a/man/dropNamed.Rd
+++ b/man/dropNamed.Rd
@@ -23,4 +23,3 @@ Subset of object of same type as \code{x}. The object is not simplified,
 \description{
 Drop named elements of an object.
 }
-
diff --git a/man/ensureVector.Rd b/man/ensureVector.Rd
index 376ea4b..65e1c3b 100644
--- a/man/ensureVector.Rd
+++ b/man/ensureVector.Rd
@@ -4,22 +4,29 @@
 \alias{ensureVector}
 \title{Blow up single scalars / objects to vectors /  list by replication.}
 \usage{
-ensureVector(x, n, cl = NULL, names = NULL)
+ensureVector(x, n = 1L, cl = NULL, names = NULL, ensure.list = FALSE)
 }
 \arguments{
 \item{x}{[any]\cr
 Input element.}
 
-\item{n}{[\code{integer}]\cr
-Desired length.}
+\item{n}{[\code{integer(1)}]\cr
+Desired length.
+Default is 1 (the most common case).}
 
-\item{cl}{[\code{character(1)}*]\cr
-Only do the operation if \code{x} inherits from this class, otherwise simply let x pass.
+\item{cl}{[\code{character}*]\cr
+Only do the operation if \code{x} inherits from this one of these classes,
+otherwise simply let \code{x} pass.
 Default is \code{NULL} which means to always do the operation.}
 
 \item{names}{[\code{character}*] \cr
 Names for result.
 Default is \code{NULL}, which means no names.}
+
+\item{ensure.list}{[\code{logical(1)}]\cr
+Should \code{x} be wrapped in a list in any case?
+Default is \code{FALSE}, i.e., if \code{x} is a scalar value, a vector is
+returned.}
 }
 \value{
 Ether a vector or list of length \code{n} with replicated \code{x} or \code{x} unchanged..
@@ -28,4 +35,3 @@ Ether a vector or list of length \code{n} with replicated \code{x} or \code{x} u
 Useful for standard argument conversion where a user can input a single
 element, but this has to be replicated now n times for a resulting vector or list.
 }
-
diff --git a/man/explode.Rd b/man/explode.Rd
index b888bfc..8409d6b 100644
--- a/man/explode.Rd
+++ b/man/explode.Rd
@@ -25,4 +25,3 @@ Split up a string into substrings according to a seperator.
 explode("foo bar")
 explode("comma,seperated,values", sep = ",")
 }
-
diff --git a/man/extractSubList.Rd b/man/extractSubList.Rd
index 93f4744..c538322 100644
--- a/man/extractSubList.Rd
+++ b/man/extractSubList.Rd
@@ -43,4 +43,3 @@ xs = list(list(a = 1, b = 2), list(a = 5, b = 7))
 extractSubList(xs, "a")
 extractSubList(xs, "a", simplify = FALSE)
 }
-
diff --git a/man/filterNull.Rd b/man/filterNull.Rd
index 081b1c4..0006c95 100644
--- a/man/filterNull.Rd
+++ b/man/filterNull.Rd
@@ -16,4 +16,3 @@ List.}
 \description{
 Filter a list for NULL values
 }
-
diff --git a/man/getAttributeNames.Rd b/man/getAttributeNames.Rd
index 71f995b..d5fac95 100644
--- a/man/getAttributeNames.Rd
+++ b/man/getAttributeNames.Rd
@@ -19,4 +19,3 @@ Source object.}
 Helper function for determining the vector of attribute names
 of a given object.
 }
-
diff --git a/man/getClass1.Rd b/man/getClass1.Rd
index c529818..1853a09 100644
--- a/man/getClass1.Rd
+++ b/man/getClass1.Rd
@@ -19,4 +19,3 @@ Wrapper for \code{class(x)[1]}.
 \note{
 \code{getClass} is a function in \code{methods}. Do not confuse.
 }
-
diff --git a/man/getFirst.Rd b/man/getFirst.Rd
index 8b63048..f9775ec 100644
--- a/man/getFirst.Rd
+++ b/man/getFirst.Rd
@@ -19,4 +19,3 @@ Selected element. The element name is dropped.
 \description{
 Get the first/last element of a list/vector.
 }
-
diff --git a/man/getMaxIndex.Rd b/man/getMaxIndex.Rd
index 966a2d9..32837ae 100644
--- a/man/getMaxIndex.Rd
+++ b/man/getMaxIndex.Rd
@@ -3,11 +3,14 @@
 \name{getMaxIndex}
 \alias{getMaxIndex}
 \alias{getMinIndex}
-\title{Return index of maximal/minimal element in numerical vector.}
+\alias{getBestIndex}
+\title{Return index of maximal/minimal/best element in numerical vector.}
 \usage{
 getMaxIndex(x, ties.method = "random", na.rm = FALSE)
 
 getMinIndex(x, ties.method = "random", na.rm = FALSE)
+
+getBestIndex(x, minimize = TRUE, ...)
 }
 \arguments{
 \item{x}{[\code{numeric}]\cr
@@ -22,6 +25,13 @@ Default is \dQuote{random}.}
 If \code{FALSE}, NA is returned if an NA is encountered in \code{x}.
 If \code{TRUE}, NAs are disregarded.
 Default is \code{FALSE}}
+
+\item{minimize}{[\code{logical(1)}]\cr
+Minimal element is considered best?
+Default is \code{TRUE}.}
+
+\item{...}{[any]\cr
+Further arguments passed down to the delegate.}
 }
 \value{
 [\code{integer(1)}].
@@ -30,4 +40,7 @@ Default is \code{FALSE}}
 If \code{x} is empty or only contains NAs which are to be removed,
 -1 is returned.
 }
-
+\note{
+Function \code{getBestIndex} is a simple wrapper for \code{getMinIndex} or
+\code{getMaxIndex} respectively depending on the argument \code{minimize}.
+}
diff --git a/man/getMaxIndexOfRows.Rd b/man/getMaxIndexOfRows.Rd
index 125f5e2..d70f7ed 100644
--- a/man/getMaxIndexOfRows.Rd
+++ b/man/getMaxIndexOfRows.Rd
@@ -1,10 +1,10 @@
 % Generated by roxygen2: do not edit by hand
 % Please edit documentation in R/getMaxColIndex.R
 \name{getMaxIndexOfRows}
-\alias{getMaxIndexOfCols}
 \alias{getMaxIndexOfRows}
-\alias{getMinIndexOfCols}
 \alias{getMinIndexOfRows}
+\alias{getMaxIndexOfCols}
+\alias{getMinIndexOfCols}
 \title{Find row- or columnwise the index of the maximal / minimal element in a matrix.}
 \usage{
 getMaxIndexOfRows(x, ties.method = "random", na.rm = FALSE)
@@ -46,4 +46,3 @@ print(x)
 print(getMaxIndexOfRows(x))
 print(getMinIndexOfRows(x))
 }
-
diff --git a/man/getOperatingSystem.Rd b/man/getOperatingSystem.Rd
index c4d1355..d10360b 100644
--- a/man/getOperatingSystem.Rd
+++ b/man/getOperatingSystem.Rd
@@ -2,10 +2,10 @@
 % Please edit documentation in R/getOperatingSystem.R
 \name{getOperatingSystem}
 \alias{getOperatingSystem}
-\alias{isDarwin}
-\alias{isLinux}
-\alias{isUnix}
 \alias{isWindows}
+\alias{isUnix}
+\alias{isLinux}
+\alias{isDarwin}
 \title{Functions to determine the operating system.}
 \usage{
 getOperatingSystem()
@@ -30,4 +30,3 @@ See above.
 \item{isWindows}{Predicate for OS string, returns \code{logical(1)}.}
 }
 }
-
diff --git a/man/getRelativePath.Rd b/man/getRelativePath.Rd
index 6ece36e..dfdd66a 100644
--- a/man/getRelativePath.Rd
+++ b/man/getRelativePath.Rd
@@ -26,4 +26,3 @@ Constructs a relative path from path \code{from} to path \code{to}.
 If this is not possible (i.e. different drive letters on windows systems),
 \code{NA} is returned.
 }
-
diff --git a/man/getUnixTime.Rd b/man/getUnixTime.Rd
index 2245f42..2e25993 100644
--- a/man/getUnixTime.Rd
+++ b/man/getUnixTime.Rd
@@ -12,4 +12,3 @@ getUnixTime()
 \description{
 Simple wrapper for \code{as.integer(Sys.time())}.
 }
-
diff --git a/man/getUsedFactorLevels.Rd b/man/getUsedFactorLevels.Rd
index eb30df6..b1f6dc0 100644
--- a/man/getUsedFactorLevels.Rd
+++ b/man/getUsedFactorLevels.Rd
@@ -17,4 +17,3 @@ The factor.}
 Determines the factor levels of a factor type vector
 that are actually occuring in it.
 }
-
diff --git a/man/hasAttributes.Rd b/man/hasAttributes.Rd
index 11a8806..08000db 100644
--- a/man/hasAttributes.Rd
+++ b/man/hasAttributes.Rd
@@ -21,4 +21,3 @@ Vector of strings, i.e., attribute names.}
 \description{
 Check if given object has certain attributes.
 }
-
diff --git a/man/insert.Rd b/man/insert.Rd
index 998242f..f50f0be 100644
--- a/man/insert.Rd
+++ b/man/insert.Rd
@@ -30,4 +30,3 @@ xs2 = list(b = 1, c = 4)
 insert(xs1, xs2)
 insert(xs1, xs2, elements = "c")
 }
-
diff --git a/man/is.error.Rd b/man/is.error.Rd
index 58bee09..b3d7719 100644
--- a/man/is.error.Rd
+++ b/man/is.error.Rd
@@ -25,4 +25,3 @@ print(is.error(x))
 x = 1
 print(is.error(x))
 }
-
diff --git a/man/isDirectory.Rd b/man/isDirectory.Rd
index 3ebe342..1ecdd13 100644
--- a/man/isDirectory.Rd
+++ b/man/isDirectory.Rd
@@ -20,4 +20,3 @@ If a file does not exist, \code{FALSE} is returned.
 print(isDirectory(tempdir()))
 print(isDirectory(tempfile()))
 }
-
diff --git a/man/isEmptyDirectory.Rd b/man/isEmptyDirectory.Rd
index 6421e29..5b465d4 100644
--- a/man/isEmptyDirectory.Rd
+++ b/man/isEmptyDirectory.Rd
@@ -20,4 +20,3 @@ If file does not exist or is not a directory, \code{FALSE} is returned.
 print(isEmptyDirectory(tempdir()))
 print(isEmptyDirectory(tempfile()))
 }
-
diff --git a/man/isExpensiveExampleOk.Rd b/man/isExpensiveExampleOk.Rd
index e696a16..0d78871 100644
--- a/man/isExpensiveExampleOk.Rd
+++ b/man/isExpensiveExampleOk.Rd
@@ -24,4 +24,3 @@ if (isExpensiveExampleOk()) {
   runif(1)
 }
 }
-
diff --git a/man/isFALSE.Rd b/man/isFALSE.Rd
index 6072046..5806618 100644
--- a/man/isFALSE.Rd
+++ b/man/isFALSE.Rd
@@ -20,4 +20,3 @@ A wrapper for \code{identical(x, FALSE)}.
 isFALSE(0)
 isFALSE(FALSE)
 }
-
diff --git a/man/isProperlyNamed.Rd b/man/isProperlyNamed.Rd
index aed1eac..8b7a26b 100644
--- a/man/isProperlyNamed.Rd
+++ b/man/isProperlyNamed.Rd
@@ -21,4 +21,3 @@ isProperlyNamed(list(1))
 isProperlyNamed(list(a = 1))
 isProperlyNamed(list(a = 1, 2))
 }
-
diff --git a/man/isScalarNA.Rd b/man/isScalarNA.Rd
index 0d621cf..9c004f5 100644
--- a/man/isScalarNA.Rd
+++ b/man/isScalarNA.Rd
@@ -16,4 +16,3 @@ Object to check.}
 \description{
 Checks whether object is from \code{(NA, NA_integer, NA_real_, NA_character_, NA_complex_)}.
 }
-
diff --git a/man/isScalarValue.Rd b/man/isScalarValue.Rd
index bfc9b10..92f6a36 100644
--- a/man/isScalarValue.Rd
+++ b/man/isScalarValue.Rd
@@ -1,13 +1,13 @@
 % Generated by roxygen2: do not edit by hand
 % Please edit documentation in R/isScalarValue.R
 \name{isScalarValue}
-\alias{isScalarCharacter}
-\alias{isScalarComplex}
-\alias{isScalarFactor}
-\alias{isScalarInteger}
+\alias{isScalarValue}
 \alias{isScalarLogical}
 \alias{isScalarNumeric}
-\alias{isScalarValue}
+\alias{isScalarInteger}
+\alias{isScalarComplex}
+\alias{isScalarCharacter}
+\alias{isScalarFactor}
 \title{Is given argument an atomic vector or factor of length 1?}
 \usage{
 isScalarValue(x, na.ok = TRUE, null.ok = FALSE, type = "atomic")
@@ -47,4 +47,3 @@ Default is \dQuote{atomic}, so no special restriction.}
 \description{
 More specific functions for scalars of a given type exist, too.
 }
-
diff --git a/man/isSubset.Rd b/man/isSubset.Rd
index 1713c46..9c17b28 100644
--- a/man/isSubset.Rd
+++ b/man/isSubset.Rd
@@ -24,4 +24,3 @@ Checks for strict/proper subset relation.}
 \description{
 Check subset relation on two vectors.
 }
-
diff --git a/man/isSuperset.Rd b/man/isSuperset.Rd
index 257f445..b656aad 100644
--- a/man/isSuperset.Rd
+++ b/man/isSuperset.Rd
@@ -24,4 +24,3 @@ Checks for strict/proper superset relation.}
 \description{
 Check superset relation on two vectors.
 }
-
diff --git a/man/isValidName.Rd b/man/isValidName.Rd
index d0cb123..d5397c1 100644
--- a/man/isValidName.Rd
+++ b/man/isValidName.Rd
@@ -22,4 +22,3 @@ Default is \code{TRUE}.}
 \description{
 Can some strings be used for column or list element names without problems?
 }
-
diff --git a/man/itostr.Rd b/man/itostr.Rd
index dda8d88..cb89cda 100644
--- a/man/itostr.Rd
+++ b/man/itostr.Rd
@@ -28,4 +28,3 @@ itostr(1:10, 2)
 # base36 encoding of a large number
 itostr(1e7, 36)
 }
-
diff --git a/man/lib.Rd b/man/lib.Rd
index 008dadd..15b1f45 100644
--- a/man/lib.Rd
+++ b/man/lib.Rd
@@ -24,4 +24,3 @@ and should not be used by other packages.
 lib("BBmisc", "MASS", "rpart")
 }
 }
-
diff --git a/man/load2.Rd b/man/load2.Rd
index b742f3e..08cf879 100644
--- a/man/load2.Rd
+++ b/man/load2.Rd
@@ -39,4 +39,3 @@ save2(file = fn, a = 1, b = 2, c = 3)
 load2(fn, parts = "a")
 load2(fn, parts = c("a", "c"))
 }
-
diff --git a/man/lsort.Rd b/man/lsort.Rd
index efefd0c..e4c8c6d 100644
--- a/man/lsort.Rd
+++ b/man/lsort.Rd
@@ -15,4 +15,3 @@ See \code{\link{sort}}.
 \description{
 A wrapper for \code{\link{sort}} to sort using the \dQuote{C} collating rules.
 }
-
diff --git a/man/makeDataFrame.Rd b/man/makeDataFrame.Rd
index deda129..dee0da6 100644
--- a/man/makeDataFrame.Rd
+++ b/man/makeDataFrame.Rd
@@ -40,4 +40,3 @@ print(makeDataFrame(3, 2, init = 7))
 print(makeDataFrame(3, 2, "logical"))
 print(makeDataFrame(3, 2, c("logical", "numeric")))
 }
-
diff --git a/man/makeFileCache.Rd b/man/makeFileCache.Rd
index 55c8b12..6d5e86d 100644
--- a/man/makeFileCache.Rd
+++ b/man/makeFileCache.Rd
@@ -21,4 +21,3 @@ This closure returns a wrapper around \code{\link{load2}} which per
 default caches loaded objects and returns the cached version
 in subsequent calls.
 }
-
diff --git a/man/makeProgressBar.Rd b/man/makeProgressBar.Rd
index bbc4028..758cecb 100644
--- a/man/makeProgressBar.Rd
+++ b/man/makeProgressBar.Rd
@@ -1,8 +1,8 @@
 % Generated by roxygen2: do not edit by hand
 % Please edit documentation in R/makeProgressBar.R
 \name{makeProgressBar}
-\alias{ProgressBar}
 \alias{makeProgressBar}
+\alias{ProgressBar}
 \title{Create a progress bar with estimated time.}
 \usage{
 makeProgressBar(min = 0, max = 100, label = "", char = "+",
@@ -88,4 +88,3 @@ for (i in 1:5) {
 }
 }
 }
-
diff --git a/man/makeS3Obj.Rd b/man/makeS3Obj.Rd
index d8ce7c9..adcb00f 100644
--- a/man/makeS3Obj.Rd
+++ b/man/makeS3Obj.Rd
@@ -22,4 +22,3 @@ Simple wrapper for \code{as.list} and \code{\link{setClasses}}.
 \examples{
 makeS3Obj("car", speed = 100, color = "red")
 }
-
diff --git a/man/makeSimpleFileLogger.Rd b/man/makeSimpleFileLogger.Rd
index 978e402..39786ad 100644
--- a/man/makeSimpleFileLogger.Rd
+++ b/man/makeSimpleFileLogger.Rd
@@ -1,8 +1,8 @@
 % Generated by roxygen2: do not edit by hand
 % Please edit documentation in R/makeSimpleFileLogger.R
 \name{makeSimpleFileLogger}
-\alias{SimpleFileLogger}
 \alias{makeSimpleFileLogger}
+\alias{SimpleFileLogger}
 \title{Simple logger which outputs to a file.}
 \usage{
 makeSimpleFileLogger(logfile, touch = FALSE, keep = 10L)
@@ -31,4 +31,3 @@ Default is \code{10}.}
 Creates a simple file logger closure to log to a file, including time stamps.
 An optional buffer holds the last few log messages.
 }
-
diff --git a/man/mapValues.Rd b/man/mapValues.Rd
index c88dcef..d94d19c 100644
--- a/man/mapValues.Rd
+++ b/man/mapValues.Rd
@@ -49,4 +49,3 @@ mapValues(x, c(2, 3), c(99, 100))
 x = factor(c("aab", "aba", "baa"))
 mapValues(x, "a.a", "zzz", regex = TRUE)
 }
-
diff --git a/man/messagef.Rd b/man/messagef.Rd
index 95979bb..9bfaccb 100644
--- a/man/messagef.Rd
+++ b/man/messagef.Rd
@@ -23,4 +23,3 @@ A simple wrapper for \code{message(sprintf(...))}.
 msg = "a message"
 warningf("this is \%s", msg)
 }
-
diff --git a/man/namedList.Rd b/man/namedList.Rd
index 4446569..d071c5f 100644
--- a/man/namedList.Rd
+++ b/man/namedList.Rd
@@ -18,10 +18,9 @@ If given all list elements are initialized to this, otherwise
 [\code{list}].
 }
 \description{
-Create named list, possibly initialized with a certain element.
+Even an empty list will always be named.
 }
 \examples{
 namedList(c("a", "b"))
 namedList(c("a", "b"), init = 1)
 }
-
diff --git a/man/names2.Rd b/man/names2.Rd
index 20e55ec..b44c266 100644
--- a/man/names2.Rd
+++ b/man/names2.Rd
@@ -30,4 +30,3 @@ names(x[1:2]) = letters[1:2]
 names(x)
 names2(x)
 }
-
diff --git a/man/nin.Rd b/man/nin.Rd
index 194a363..2837b79 100644
--- a/man/nin.Rd
+++ b/man/nin.Rd
@@ -16,4 +16,3 @@ Values to match against.}
 \description{
 Simply a negated \code{in} operator.
 }
-
diff --git a/man/normalize.Rd b/man/normalize.Rd
index cab4e3c..0156277 100644
--- a/man/normalize.Rd
+++ b/man/normalize.Rd
@@ -55,4 +55,3 @@ The method also handles NAs in in \code{x} and leaves them untouched.
 \seealso{
 \code{\link{scale}}
 }
-
diff --git a/man/optimizeSubInts.Rd b/man/optimizeSubInts.Rd
index 89adaf4..3a82f63 100644
--- a/man/optimizeSubInts.Rd
+++ b/man/optimizeSubInts.Rd
@@ -37,4 +37,3 @@ The univariate \code{\link{optimize}} can stop at arbitrarily bad points when
 \code{\link{optimize}} is run on all of them (and on the original big interval) and
 the best obtained point is returned.
 }
-
diff --git a/man/pause.Rd b/man/pause.Rd
index 99ebf41..0944905 100644
--- a/man/pause.Rd
+++ b/man/pause.Rd
@@ -9,4 +9,3 @@ pause()
 \description{
 Pause in interactive mode and continue on <Enter>.
 }
-
diff --git a/man/printHead.Rd b/man/printHead.Rd
new file mode 100644
index 0000000..77f17a1
--- /dev/null
+++ b/man/printHead.Rd
@@ -0,0 +1,25 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/printHead.R
+\name{printHead}
+\alias{printHead}
+\title{More meaningful \code{head(df)} output.}
+\usage{
+printHead(x, n = 6L)
+}
+\arguments{
+\item{x}{[\code{data.frame} | \code{matrix} | \code{list} | \code{vector}]\cr
+Object.}
+
+\item{n}{[\code{integer(1)}]\cr
+Single positive integer: number of rows for a matrix/data.frame or number of
+elements for vectors/lists respectively.}
+}
+\value{
+Nothing.
+}
+\description{
+The behaviour is similar to \code{print(head(x, n))}. The difference is, that if
+the number of rows in a data.frame/matrix or the number of elements in a list
+or vector is larger than \code{n}, additional information is printed about
+the total number of rows or elements respectively.
+}
diff --git a/man/printStrToChar.Rd b/man/printStrToChar.Rd
index 54247ae..31eebb6 100644
--- a/man/printStrToChar.Rd
+++ b/man/printStrToChar.Rd
@@ -24,4 +24,3 @@ Print \code{str(x)} of an object to a string / character vector.
 \examples{
 printStrToChar(iris)
 }
-
diff --git a/man/printToChar.Rd b/man/printToChar.Rd
index c4f6694..b276386 100644
--- a/man/printToChar.Rd
+++ b/man/printToChar.Rd
@@ -25,4 +25,3 @@ Prints object to a string / character vector.
 x = data.frame(a = 1:2, b = 3:4)
 str(printToChar(x))
 }
-
diff --git a/man/rangeVal.Rd b/man/rangeVal.Rd
index 4e3c126..10ea2de 100644
--- a/man/rangeVal.Rd
+++ b/man/rangeVal.Rd
@@ -21,4 +21,3 @@ Default is \code{FALSE}}
 \description{
 A simple wrapper for \code{diff(range(x))}, so \code{max(x) - min(x)}.
 }
-
diff --git a/man/requirePackages.Rd b/man/requirePackages.Rd
index d94d6f9..dd48b41 100644
--- a/man/requirePackages.Rd
+++ b/man/requirePackages.Rd
@@ -56,4 +56,3 @@ If \code{why} is \code{NULL} the message is:
 \examples{
 requirePackages(c("BBmisc", "base"), why = "BBmisc example")
 }
-
diff --git a/man/rowLapply.Rd b/man/rowLapply.Rd
index e14db2d..3cf6da1 100644
--- a/man/rowLapply.Rd
+++ b/man/rowLapply.Rd
@@ -47,4 +47,3 @@ but on the rows.
 \examples{
  rowLapply(iris, function(x) x$Sepal.Length + x$Sepal.Width)
 }
-
diff --git a/man/save2.Rd b/man/save2.Rd
index a032677..e92175b 100644
--- a/man/save2.Rd
+++ b/man/save2.Rd
@@ -38,4 +38,3 @@ except \code{list} and \code{envir}, are available and passed to
 x = 1
 save2(y = x, file = tempfile())
 }
-
diff --git a/man/seq_row.Rd b/man/seq_row.Rd
index 45daa9a..c2766da 100644
--- a/man/seq_row.Rd
+++ b/man/seq_row.Rd
@@ -1,8 +1,8 @@
 % Generated by roxygen2: do not edit by hand
 % Please edit documentation in R/seq.R
 \name{seq_row}
-\alias{seq_col}
 \alias{seq_row}
+\alias{seq_col}
 \title{Generate sequences along rows or cols.}
 \usage{
 seq_row(x)
@@ -25,4 +25,3 @@ data(iris)
 seq_row(iris)
 seq_col(iris)
 }
-
diff --git a/man/setAttribute.Rd b/man/setAttribute.Rd
index 8886548..f06965a 100644
--- a/man/setAttribute.Rd
+++ b/man/setAttribute.Rd
@@ -25,4 +25,3 @@ A wrapper for \code{attr(x, which) = y}.
 \examples{
 setAttribute(list(), "foo", 1)
 }
-
diff --git a/man/setClasses.Rd b/man/setClasses.Rd
index a3cdbda..b0e0b17 100644
--- a/man/setClasses.Rd
+++ b/man/setClasses.Rd
@@ -22,4 +22,3 @@ A wrapper for \code{class(x) = classes}.
 \examples{
 setClasses(list(), c("foo1", "foo2"))
 }
-
diff --git a/man/setRowNames.Rd b/man/setRowNames.Rd
index 0d98899..b6e7b2e 100644
--- a/man/setRowNames.Rd
+++ b/man/setRowNames.Rd
@@ -1,8 +1,8 @@
 % Generated by roxygen2: do not edit by hand
 % Please edit documentation in R/setRowColNames.R
 \name{setRowNames}
-\alias{setColNames}
 \alias{setRowNames}
+\alias{setColNames}
 \title{Wrapper for \code{rownames(x) = y}, \code{colnames(x) = y}.}
 \usage{
 setRowNames(x, names)
@@ -25,4 +25,3 @@ Wrapper for \code{rownames(x) = y}, \code{colnames(x) = y}.
 \examples{
 setColNames(matrix(1:4, 2, 2), c("a", "b"))
 }
-
diff --git a/man/setValue.Rd b/man/setValue.Rd
index 5d1576d..71667db 100644
--- a/man/setValue.Rd
+++ b/man/setValue.Rd
@@ -22,4 +22,3 @@ Has to be a list if \code{index} is a vector.}
 \description{
 This wrapper supports setting elements to \code{NULL}.
 }
-
diff --git a/man/sortByCol.Rd b/man/sortByCol.Rd
index 1125773..bc91804 100644
--- a/man/sortByCol.Rd
+++ b/man/sortByCol.Rd
@@ -26,4 +26,3 @@ Default is \code{TRUE}.}
 \description{
 Sort the rows of a data.frame according to one or more columns.
 }
-
diff --git a/man/splitPath.Rd b/man/splitPath.Rd
index a8cc2c7..310206f 100644
--- a/man/splitPath.Rd
+++ b/man/splitPath.Rd
@@ -19,4 +19,3 @@ The first normalized path is split on forward and backward slashes and its compo
 character vector. The drive or network home are extracted separately on windows systems and
 empty on all other systems.
 }
-
diff --git a/man/splitTime.Rd b/man/splitTime.Rd
index ee2194e..0d15423 100644
--- a/man/splitTime.Rd
+++ b/man/splitTime.Rd
@@ -27,4 +27,3 @@ Note that a year is simply defined as exactly 365 days.
 \examples{
 splitTime(1000)
 }
-
diff --git a/man/stopf.Rd b/man/stopf.Rd
index 26d320a..733a5e0 100644
--- a/man/stopf.Rd
+++ b/man/stopf.Rd
@@ -27,4 +27,3 @@ by default.
 err = "an error."
 try(stopf("This is \%s", err))
 }
-
diff --git a/man/strrepeat.Rd b/man/strrepeat.Rd
index 0181d18..a2128d1 100644
--- a/man/strrepeat.Rd
+++ b/man/strrepeat.Rd
@@ -25,4 +25,3 @@ Repeat and join a string
 \examples{
 strrepeat("x", 3)
 }
-
diff --git a/man/suppressAll.Rd b/man/suppressAll.Rd
index 1c11b19..62ed8d5 100644
--- a/man/suppressAll.Rd
+++ b/man/suppressAll.Rd
@@ -24,4 +24,3 @@ suppressAll({
   warning("foo")
 })
 }
-
diff --git a/man/symdiff.Rd b/man/symdiff.Rd
index 54f671c..7ab37fa 100644
--- a/man/symdiff.Rd
+++ b/man/symdiff.Rd
@@ -19,4 +19,3 @@ Set 2.}
 \description{
 Calculates symmetric set difference between two sets.
 }
-
diff --git a/man/system3.Rd b/man/system3.Rd
index 58fba1e..e36b734 100644
--- a/man/system3.Rd
+++ b/man/system3.Rd
@@ -33,4 +33,3 @@ Default is \code{wait}.}
 \description{
 Wrapper for \code{\link{system2}} with better return type and errorhandling.
 }
-
diff --git a/man/toRangeStr.Rd b/man/toRangeStr.Rd
index b28c1af..83f05ea 100644
--- a/man/toRangeStr.Rd
+++ b/man/toRangeStr.Rd
@@ -29,4 +29,3 @@ Convert a numerical vector into a range string.
 x = sample(1:10, 7)
 toRangeStr(x)
 }
-
diff --git a/man/vlapply.Rd b/man/vlapply.Rd
index a0dfbca..343219c 100644
--- a/man/vlapply.Rd
+++ b/man/vlapply.Rd
@@ -1,10 +1,10 @@
 % Generated by roxygen2: do not edit by hand
 % Please edit documentation in R/vapply.R
 \name{vlapply}
-\alias{vcapply}
-\alias{viapply}
 \alias{vlapply}
+\alias{viapply}
 \alias{vnapply}
+\alias{vcapply}
 \title{Apply a function with a predefined return value}
 \usage{
 vlapply(x, fun, ..., use.names = TRUE)
@@ -36,4 +36,3 @@ The function is expected to return a single \code{logical}, \code{integer},
 \code{numeric} or \code{character} value, depending on the second letter
 of the function name.
 }
-
diff --git a/man/warningf.Rd b/man/warningf.Rd
index d5ce1f8..ba54d5e 100644
--- a/man/warningf.Rd
+++ b/man/warningf.Rd
@@ -29,4 +29,3 @@ A wrapper for \code{\link{warning}} with \code{\link{sprintf}} applied to the ar
 msg = "a warning"
 warningf("this is \%s", msg)
 }
-
diff --git a/man/which.first.Rd b/man/which.first.Rd
index ca24023..d5d78a0 100644
--- a/man/which.first.Rd
+++ b/man/which.first.Rd
@@ -29,4 +29,3 @@ Find the index of first/last \code{TRUE} value in a logical vector.
  which.first(c(FALSE, TRUE))
  which.last(c(FALSE, FALSE))
 }
-
diff --git a/src/init.c b/src/init.c
new file mode 100644
index 0000000..cc9db21
--- /dev/null
+++ b/src/init.c
@@ -0,0 +1,28 @@
+#include <R.h>
+#include <Rinternals.h>
+#include <stdlib.h> // for NULL
+#include <R_ext/Rdynload.h>
+
+/* .Call calls */
+extern SEXP c_getMaxIndex(SEXP, SEXP, SEXP);
+extern SEXP c_getMaxIndexOfCols(SEXP, SEXP, SEXP);
+extern SEXP c_getMaxIndexOfRows(SEXP, SEXP, SEXP);
+extern SEXP c_which_first(SEXP, SEXP);
+extern SEXP c_which_last(SEXP, SEXP);
+extern SEXP itostr(SEXP, SEXP);
+
+static const R_CallMethodDef CallEntries[] = {
+    {"c_getMaxIndex",       (DL_FUNC) &c_getMaxIndex,       3},
+    {"c_getMaxIndexOfCols", (DL_FUNC) &c_getMaxIndexOfCols, 3},
+    {"c_getMaxIndexOfRows", (DL_FUNC) &c_getMaxIndexOfRows, 3},
+    {"c_which_first",       (DL_FUNC) &c_which_first,       2},
+    {"c_which_last",        (DL_FUNC) &c_which_last,        2},
+    {"itostr",              (DL_FUNC) &itostr,              2},
+    {NULL, NULL, 0}
+};
+
+void R_init_BBmisc(DllInfo *dll) {
+    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
+    R_useDynamicSymbols(dll, FALSE);
+}
+
diff --git a/tests/testthat/test_convertListOfRowsToDataFrame.R b/tests/testthat/test_convertListOfRowsToDataFrame.R
index 5f35bc0..20d5c64 100644
--- a/tests/testthat/test_convertListOfRowsToDataFrame.R
+++ b/tests/testthat/test_convertListOfRowsToDataFrame.R
@@ -30,7 +30,7 @@ test_that("convertListOfRowstoDataFrame", {
     strings.as.factors = FALSE, row.names = 1:2)
   df2 = setRowNames(data.frame(x = 1:2, y = c("a", "b"), stringsAsFactors = FALSE), 1:2)
   expect_equal(df1, df2)
-  
+
   df1 = convertListOfRowsToDataFrame(list(list(x = 1, y = "a"), list(x = 2, y = "b")),
     strings.as.factors = FALSE, col.names = c("c1", "c2"))
   df2 = data.frame(c1 = 1:2, c2 = c("a", "b"), stringsAsFactors = FALSE)
@@ -41,3 +41,25 @@ test_that("convertListOfRowstoDataFrame", {
   df2 = setColNames(data.frame(1:2, c("a", "b"), stringsAsFactors = FALSE), 1:2)
   expect_equal(df1, df2)
 })
+
+
+test_that("convertListOfRowsToDataFrame works with missing stuff in the rows", {
+
+  df1 = setColNames(data.frame(1:2, c("a", NA), stringsAsFactors = FALSE), 1:2)
+  df2 = convertListOfRowsToDataFrame(list(list(x = 1, y = "a"), list(x = 2)),
+    strings.as.factors = FALSE, col.names = 1:2)
+  df3 = convertListOfRowsToDataFrame(list(list(x = 1, y = "a"), list(x = 2, y = NULL)),
+    strings.as.factors = FALSE, col.names = 1:2)
+  expect_equal(df1, df2)
+  expect_equal(df1, df3)
+
+  df1 = setColNames(data.frame(c(1, NA), c(NA, NA), stringsAsFactors = FALSE), 1:2)
+  df2 = convertListOfRowsToDataFrame(list(list(x = 1), list(y = NULL)),
+    strings.as.factors = FALSE, col.names = 1:2)
+  df3 = convertListOfRowsToDataFrame(list(list(x = 1, y = NULL), list(y = NULL)),
+    strings.as.factors = FALSE, col.names = 1:2)
+  expect_equal(df1, df2)
+  expect_equal(df1, df3)
+})
+
+
diff --git a/tests/testthat/test_convertToShortString.R b/tests/testthat/test_convertToShortString.R
index 778433a..8210630 100644
--- a/tests/testthat/test_convertToShortString.R
+++ b/tests/testthat/test_convertToShortString.R
@@ -7,6 +7,9 @@ test_that("convertToShortString", {
   expect_equal(convertToShortString(numeric(0)), "numeric(0)")
   expect_equal(convertToShortString(factor(c())), "factor(0)")
   expect_equal(convertToShortString(iris), "<data.frame>")
+  expect_equal(convertToShortString(NULL), "<NULL>")
+  expect_equal(convertToShortString(c(a=1, b=2)), "1,2")
+  expect_equal(convertToShortString(expression(a + b + 3)), "a + b + 3")
   expect_equal(convertToShortString(list(a=1, 45)), "a=1, <unnamed>=45")
   expect_equal(convertToShortString(list(a=1, b=list(x=3))), "a=1, b=<list>")
   expect_equal(convertToShortString(list(a=1, b=iris)), "a=1, b=<data.frame>")
@@ -17,7 +20,7 @@ test_that("convertToShortString", {
   expect_equal(convertToShortString(list(a=1:20)), "a=1,2,3,4,5,6,...")
   expect_equal(convertToShortString(list(a=1, 2, b=3)), "a=1, <unnamed>=2, b=3")
   expect_equal(convertToShortString(list(a=1, 2, b=data.frame())), "a=1, <unnamed>=2, b=<data.frame>")
-  expect_equal(convertToShortString(list(a=identity, b=new.env())), "a=<function>, b=<environment>")
+  expect_equal(convertToShortString(list(a=identity, b=new.env(), c = NULL, d = expression(a + b + 3))), "a=<function>, b=<environment>, c=<NULL>, d=a + b + 3")
 
   expect_equal(convertToShortString(list(a=1, b=3.2)), "a=1, b=3.2")
   expect_equal(convertToShortString(list(a=1, b=3.223), num.format="%.2f"), "a=1.00, b=3.22")
diff --git a/tests/testthat/test_ensureVector.R b/tests/testthat/test_ensureVector.R
index 3327de2..bde7f9c 100644
--- a/tests/testthat/test_ensureVector.R
+++ b/tests/testthat/test_ensureVector.R
@@ -1,6 +1,8 @@
 context("ensureVector")
 
 test_that("ensureVector", {
+  # default is n = 1L
+  expect_equal(ensureVector("a"), "a")
   expect_equal(ensureVector("a", n = 2L), c("a", "a"))
   expect_equal(ensureVector("a", n = 2L, cl = "integer"),  "a")
   expect_equal(ensureVector(1, n = 1), c(1))
@@ -12,5 +14,9 @@ test_that("ensureVector", {
   expect_equal(ensureVector(iris, n = 2L, cl = "data.frame"), list(iris, iris))
   expect_equal(ensureVector(iris, n = 2L), list(iris, iris))
   expect_equal(ensureVector(iris, n = 2L, names = c("a", "b")), list(a = iris, b = iris))
+
+  # check ensure.list argument
+  expect_equal(ensureVector("a", ensure.list = TRUE), list("a"))
+  expect_equal(ensureVector(3, n = 3L, ensure.list = TRUE, names = letters[1:3]), list(a = 3, b = 3, c = 3))
 })
 
diff --git a/tests/testthat/test_getMaxIndex.R b/tests/testthat/test_getMaxIndex.R
index 2259a66..91530a5 100644
--- a/tests/testthat/test_getMaxIndex.R
+++ b/tests/testthat/test_getMaxIndex.R
@@ -7,12 +7,12 @@ test_that("getMaxIndex", {
   expect_equal(getMaxIndex(c(-9, 1)), 2L)
   expect_equal(getMaxIndex(c(1, Inf, 9)), 2L)
   expect_equal(getMaxIndex(c(1, NA, 9)), NA_integer_)
-  expect_equal(getMaxIndex(c(1, NaN, 9)), NA_integer_)  
-  expect_equal(getMaxIndex(c(1, NA, 9), na.rm=TRUE), 3L)
-  expect_equal(getMaxIndex(c(1, NaN, 9), na.rm=TRUE), 3L)  
-  expect_equal(getMaxIndex(numeric(0)), integer(0))  
-  expect_equal(getMaxIndex(c()), integer(0))  
-  expect_equal(getMaxIndex(c(NA, NaN), na.rm=TRUE), integer(0))  
+  expect_equal(getMaxIndex(c(1, NaN, 9)), NA_integer_)
+  expect_equal(getMaxIndex(c(1, NA, 9), na.rm = TRUE), 3L)
+  expect_equal(getMaxIndex(c(1, NaN, 9), na.rm = TRUE), 3L)
+  expect_equal(getMaxIndex(numeric(0)), integer(0))
+  expect_equal(getMaxIndex(c()), integer(0))
+  expect_equal(getMaxIndex(c(NA, NaN), na.rm = TRUE), integer(0))
 })
 
 test_that("getMinIndex", {
@@ -22,21 +22,27 @@ test_that("getMinIndex", {
   expect_equal(getMinIndex(c(-9, 1)), 1L)
   expect_equal(getMinIndex(c(1, Inf, 9)), 1L)
   expect_equal(getMinIndex(c(1, NA, 9)), NA_integer_)
-  expect_equal(getMinIndex(c(1, NaN, 9)), NA_integer_)  
-  expect_equal(getMinIndex(c(1, NA, 9), na.rm=TRUE), 1L)
-  expect_equal(getMinIndex(c(1, NaN, 9), na.rm=TRUE), 1L)  
-  expect_equal(getMinIndex(numeric(0)), integer(0))  
-  expect_equal(getMinIndex(c()), integer(0))  
-  expect_equal(getMinIndex(c(NA, NaN), na.rm=TRUE), integer(0))  
+  expect_equal(getMinIndex(c(1, NaN, 9)), NA_integer_)
+  expect_equal(getMinIndex(c(1, NA, 9), na.rm = TRUE), 1L)
+  expect_equal(getMinIndex(c(1, NaN, 9), na.rm = TRUE), 1L)
+  expect_equal(getMinIndex(numeric(0)), integer(0))
+  expect_equal(getMinIndex(c()), integer(0))
+  expect_equal(getMinIndex(c(NA, NaN), na.rm = TRUE), integer(0))
 })
 
-
 test_that("ties", {
-  expect_equal(getMaxIndex(c(1, 9, 9), ties.method="first"), 2L)
-  expect_equal(getMaxIndex(c(1, 9, 9), ties.method="last"), 3L)
-  expect_equal(getMaxIndex(3, ties.method="first"), 1L)
-  expect_equal(getMaxIndex(3, ties.method="last"), 1L)
-  expect_equal(getMaxIndex(c(9, 1, 9, 9), ties.method="first"), 1L)
-  expect_equal(getMaxIndex(c(9, 1, 9, 9), ties.method="last"), 4L)
-  
-})
\ No newline at end of file
+  expect_equal(getMaxIndex(c(1, 9, 9), ties.method = "first"), 2L)
+  expect_equal(getMaxIndex(c(1, 9, 9), ties.method = "last"), 3L)
+  expect_equal(getMaxIndex(3, ties.method = "first"), 1L)
+  expect_equal(getMaxIndex(3, ties.method = "last"), 1L)
+  expect_equal(getMaxIndex(c(9, 1, 9, 9), ties.method = "first"), 1L)
+  expect_equal(getMaxIndex(c(9, 1, 9, 9), ties.method = "last"), 4L)
+})
+
+test_that("getBestIndex", {
+  # here we simply compare with the output of the already tested delegates
+  expect_equal(getBestIndex(c(9, 1, 3)), getMinIndex(c(9, 1, 3)))
+  expect_equal(getBestIndex(c(9, 1, 3), minimize = FALSE), getMaxIndex(c(9, 1, 3)))
+  expect_equal(getBestIndex(c(NA), na.rm = TRUE), getMinIndex(c(NA), na.rm = TRUE))
+  expect_equal(getBestIndex(c(1, 1, 9, 5), ties.method = "last"), getMinIndex(c(1, 1, 9, 5), ties.method = "last"))
+})
diff --git a/tests/testthat/test_namedList.R b/tests/testthat/test_namedList.R
index 2cc5c45..80f9141 100644
--- a/tests/testthat/test_namedList.R
+++ b/tests/testthat/test_namedList.R
@@ -1,7 +1,7 @@
 context("namedList")
 
 test_that("namedList", {
-  expect_equal(namedList(), vector("list", 0))
+  expect_equal(namedList(), setNames(vector("list", 0), nm = character()))
   expect_equal(namedList("a"), list(a=NULL))
   expect_equal(namedList(c("a", "b")), list(a=NULL, b=NULL))
   expect_equal(namedList(c("a", "b"), 1), list(a=1, b=1))
diff --git a/tests/testthat/test_printHead.R b/tests/testthat/test_printHead.R
new file mode 100644
index 0000000..4093c77
--- /dev/null
+++ b/tests/testthat/test_printHead.R
@@ -0,0 +1,9 @@
+context("printHead")
+
+test_that("printHead", {
+  expect_output(printHead(1:10), "...")
+  expect_output(printHead(as.list(1:10)), "...")
+  expect_output(printHead(iris), "...")
+  expect_output(printHead(matrix(runif(20), ncol = 2L)), "...")
+})
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/r-cran-bbmisc.git



More information about the debian-med-commit mailing list