diff options
author | Suraj Yerramilli | 2015-02-06 22:46:27 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2015-02-06 22:46:27 +0530 |
commit | ee9d6e1533070c63cd21d5a2f67799415d328845 (patch) | |
tree | 4c45a738edeb6f157706b6305457165cab373804 /R/partition.R | |
parent | 42cd9b42fb05596cd1ed81935df79c885c7e02ad (diff) | |
download | SysID-R-code-ee9d6e1533070c63cd21d5a2f67799415d328845.tar.gz SysID-R-code-ee9d6e1533070c63cd21d5a2f67799415d328845.tar.bz2 SysID-R-code-ee9d6e1533070c63cd21d5a2f67799415d328845.zip |
added an example to documentation
Diffstat (limited to 'R/partition.R')
-rw-r--r-- | R/partition.R | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/R/partition.R b/R/partition.R index ab9dba6..0c92e76 100644 --- a/R/partition.R +++ b/R/partition.R @@ -35,6 +35,13 @@ dataSlice <- function(object,indices){ #' @param object an object of class \code{idframe} #' @param p the percentage of the data that goes to training (Default : \code{0.6}) #' @return list containing estimation and validation idframe objects +#' +#' @examples +#' data(cstr) +#' splitList <- dataPartition(cstr,p=0.6) +#' train <- splitList$estimation # training set +#' test <- splitList$validation # testing set +#' #' @export dataPartition <- function(object,p=0.6){ # check if the class is correct |