Skip to content

Commit

Permalink
Merge pull request #31 from SantanderMetGroup/devel
Browse files Browse the repository at this point in the history
merge devel into master
  • Loading branch information
jorgebanomedina authored Feb 5, 2020
2 parents c427035 + 14f1fe7 commit 3b2929b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
5 changes: 5 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,8 @@ See the [Releases section](https://github.com/SantanderMetGroup/transformeR/rele
* Changes in `clusterGrid` structure to allow for flexible prediction
* Add subsetting by cluster in `subsetGrid`
* Other minor bug fixes and documentation updates

## 1.7.1 (5 Feb 2020)
* Allow type = NULL in `dataSplit' function.
* Add zenodo badge in documentation
* Other minor documentation issues.
4 changes: 2 additions & 2 deletions R/dataSplit.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
#' @param y The observations object.
#' @param f Could be a fraction, value between (0,1) indicating the fraction of the data that will define the train set,
#' or an integer indicating the number of folds. It can also be a list of folds indicating the years of each fold.
#' @param type A string, c("random","chronological"), indicating if the splits should be random or in a chronological order.
#' @param type A string. Indicates if the splitting should be random (type = "random"),
#' chronological (type = "chronological") or specified by the user (type = NULL). Default is "random".
#' Default is "random".
#' @return A list of folds containing the x and y splitted.
#' @author J. Bano-Medina
Expand Down Expand Up @@ -64,7 +65,6 @@
#' str(data.splitted[[3]]$test$y$Dates) # 1 fold out of 3 for test

dataSplit <- function(x, y, f = 3/4, type = "random") {
type <- match.arg(type, choices = c("random", "chronological"))
if (is.numeric(f)) {
if (f < 1) {
out <- vector("list", 2)
Expand Down
6 changes: 2 additions & 4 deletions inst/c4R_welcome
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
______________________________________________________
_______ ____ ________ __________ __ ________

_______ ____ ___________________ __ ________
/ ___/ / / / |/ / __ /_ __/ __/ / / / / __ /
/ / / / / / /|_/ / /_/ / / / / __/ / /_/ / /_/_/
/ /__/ /__/ / / / / __ / / / / /__ /___ / / \ \
\___/____/_/_/ /_/_/ /_/ /_/ \___/ /_/\/ \_\

github.com/SantanderMetGroup/climate4R
_____________________________________________________


3 changes: 2 additions & 1 deletion man/dataSplit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3b2929b

Please sign in to comment.