Skip to content

Commit

Permalink
Fixed #35 and #37
Browse files Browse the repository at this point in the history
  • Loading branch information
boxuancui committed Dec 13, 2016
1 parent 7c5898f commit cee6c37
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Imports:
Suggests: testthat,
covr,
knitr,
rmarkdown
rmarkdown,
rprojroot
SystemRequirements: pandoc (>= 1.12.3) - http://pandoc.org
License: GPL-2
LazyData: true
Expand Down
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
### DataExplorer 0.3.0.9000
#### Bug Fixes
* [#32](https://github.com/boxuancui/DataExplorer/issues/32): Fixed pandoc requirement error in unit test on cran.
* [#34](https://github.com/boxuancui/DataExplorer/issues/34): Fixed error message when `quiet` is not supplied. In addition, report directory are printed through `message()` instead of `cat()`.
* [#34](https://github.com/boxuancui/DataExplorer/issues/34): Fixed error message when `quiet` is not supplied. In addition, report directory are printed through `message()` instead of `cat()`.
* [#35](https://github.com/boxuancui/DataExplorer/issues/35): Added **rprojroot** to Suggests.

#### Enhancements
* [#36](https://github.com/boxuancui/DataExplorer/issues/36): Fixed warnings from data.table in `DropVar`.
* [#37](https://github.com/boxuancui/DataExplorer/issues/37): Changed all `cat()` to `message()`.
* Added more examples in README file.

---
Expand Down
2 changes: 1 addition & 1 deletion R/BarDiscrete.r
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ BarDiscrete <- function(data, na.rm = TRUE, maxcat = 50) {
ign_ind <- which(n_cat > maxcat)
if (length(ign_ind) > 0) {
set(discrete, j = ign_ind, value = NULL)
cat(length(ign_ind), "columns ignored with more than", maxcat, "categories.\n", paste0(names(ign_ind), ": ", n_cat[ign_ind], " categories\n"))
message(length(ign_ind), " columns ignored with more than ", maxcat, " categories.\n", paste0(names(ign_ind), ": ", n_cat[ign_ind], " categories\n"))
}
## Get dimension
n <- nrow(discrete)
Expand Down
2 changes: 1 addition & 1 deletion R/CorrelationDiscrete.r
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CorrelationDiscrete <- function(data, maxcat = 20, ...) {
ign_ind <- which(n_cat > maxcat)
if (length(ign_ind) > 0) {
set(discrete, j = ign_ind, value = NULL)
cat(length(ign_ind), "columns ignored with more than", maxcat, "categories.\n", paste0(names(ign_ind), ": ", n_cat[ign_ind], " categories\n"))
message(length(ign_ind), " columns ignored with more than ", maxcat, " categories.\n", paste0(names(ign_ind), ": ", n_cat[ign_ind], " categories\n"))
}
## Calculate categorical correlation and melt into tidy data format
discrete[, discrete_id := seq(nrow(discrete))]
Expand Down

0 comments on commit cee6c37

Please sign in to comment.