* using log directory 'd:/Rcompile/CRANpkg/local/3.5/clean.Rcheck' * using R version 3.5.3 (2019-03-11) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'clean/DESCRIPTION' ... OK * this is package 'clean' version '1.1.0' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'clean' can be installed ... WARNING Found the following significant warnings: Note: possible error in 'trimws(x, which = "both", ': unused argument (whitespace = "[ \t\r\n]") See 'd:/Rcompile/CRANpkg/local/3.5/clean.Rcheck/00install.out' for details. Information on the location(s) of code generating the 'Note's can be obtained by re-running with environment variable R_KEEP_PKG_SOURCE set to 'yes'. * checking installed package size ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [7s] NOTE clean_character: possible error in trimws(x, which = "both", whitespace = "[ \t\r\n]"): unused argument (whitespace = "[ \t\r\n]") * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking data for ASCII and uncompressed saves ... OK * checking examples ... ERROR Running examples in 'clean-Ex.R' failed The error most likely occurred in: > ### Name: clean > ### Title: Clean column data to a class > ### Aliases: clean clean.data.frame clean_logical clean_factor > ### clean_numeric clean_character clean_currency clean_Date clean_POSIXct > > ### ** Examples > > clean_logical(c("Yes", "No")) # English [1] TRUE FALSE > clean_logical(c("Oui", "Non")) # French [1] TRUE FALSE > clean_logical(c("ya", "tidak")) # Indonesian [1] TRUE FALSE > clean_logical(x = c("Positive", "Negative", "Unknown", "Some value"), + true = "pos", false = "neg") [1] TRUE FALSE NA NA > > gender_age <- c("male 0-50", "male 50+", "female 0-50", "female 50+") > clean_factor(gender_age, c("M", "F")) [1] M M F F Levels: M F > clean_factor(gender_age, c("Male", "Female")) [1] Male Male Female Female Levels: Male Female > clean_factor(gender_age, c("0-50", "50+"), ordered = TRUE) [1] 0-50 50+ 0-50 50+ Levels: 0-50 < 50+ > > clean_Date("13jul18", "ddmmmyy") [1] "2018-07-13" > clean_Date("12 august 2010") Cleaning dates using format 'dd mmmm yyyy' ('%d %B %Y') [1] "2010-08-12" > clean_Date("12 06 2012") Cleaning dates using format 'dd mm yyyy' ('%d %m %Y') [1] "2012-06-12" > clean_Date(36526) # Excel date Cleaning dates using Excel format [1] "2000-01-01" > clean_Date("43658") Cleaning dates using Excel format [1] "2019-07-12" > clean_Date("14526", "Excel") # "1939-10-08" [1] "1939-10-08" > > clean_POSIXct("Created log on 2019/04/11 11:23 by user Joe") [1] "2019-04-11 11:23:00 CEST" > > clean_numeric("qwerty123456") [1] 123456 > clean_numeric("Positive (0.143)") [1] 0.143 > clean_numeric("0,143") [1] 0.143 > > clean_character("qwerty123456") Error in trimws(x, which = "both", whitespace = "[ \t\r\n]") : unused argument (whitespace = "[ \t\r\n]") Calls: clean_character Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [5s] ERROR Running 'testthat.R' [3s] Running the tests in 'tests/testthat.R' failed. Complete output: > # ==================================================================== # > # TITLE # > # Fast and Easy Data Cleaning # > # # > # SOURCE # > # https://github.com/msberends/clean # > # # > # LICENCE # > # (c) 2019 Berends MS (m.s.berends@umcg.nl) # > # # > # This R package is free software; you can freely use and distribute # > # it for both personal and commercial purposes under the terms of the # > # GNU General Public License version 2.0 (GNU GPL-2), as published by # > # the Free Software Foundation. # > # # > # This R package was publicly released in the hope that it will be # > # useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # > # ==================================================================== # > > library(testthat) > library(clean) > > test_check("clean") -- 1. Error: cleaning works (@test-clean.R#42) -------------------------------- unused argument (whitespace = "[ \t\r\n]") Backtrace: 1. testthat::expect_equal(...) 4. clean::clean_character(values) == testthat results =========================================================== [ OK: 20 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ] 1. Error: cleaning works (@test-clean.R#42) Error: testthat unit tests failed Execution halted * checking PDF version of manual ... OK * DONE Status: 2 ERRORs, 1 WARNING, 1 NOTE