Description Usage Arguments Value Author(s) Examples
make a single mlr regression task for a single set of hourly/daily records
1 |
dataset |
a dataframe containing an hourly/daily set of records you want to transform to a mlr task |
drop |
a character vector specifying the explanatory variables you want to drop. |
target |
a charachter specifying the name of the target variable |
A 2 elements named list
snitch
: a boolean. Is TRUE
if function has provided the expected result. Is FALSE
is function throws an error
output
: a named list which elements are :
value
: a list which elements are of classes mlr::RegrTask()
condition
: a character specifying the condition encountered by the function: success, warning, or error.
message
: a character specifying the message relative to the condition.
stations
: a named list which elements are
used
: an integer vector of the sids of the used stations for the task creation
ignored
an integer vector of the sids of the ignored stations for the task creation
Thomas Goossens
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ## Not run:
# load magrittr for pipe use : %>%
library(magrittr)
# create the dataset
myDataset = makeDataset(
dfrom = "2017-03-04T15:00:00Z",
dto = "2017-03-04T18:00:00Z",
sensor = "tsa")
# extract the list of hourly sets of records
myDataset = myDataset$output$value
# create the tasks
myTasks = purrr::map(myDataset, makeTask, target = "tsa")
# extract the tasks from the outputs
myTasks = myTasks %>% purrr::modify_depth(1, ~.$"output"$"value"$"task")
# show the first task information
myTasks[[1]]
# extract the lists of stations kept for each task
stations_kept = myTasks %>% purrr::modify_depth(1, ~.$"output"$"value"$"stations")
# show the stations kept for the first task
stations_kept[[1]]
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.