swh:1:snp:bbfddd3343a0fc8af19439fcdc0183e28cced444
Tip revision: 62446e021fb0d4ee8f2563698e86bc576570702a authored by pat-s on 05 October 2020, 09:36:26 UTC
http -> https
http -> https
Tip revision: 62446e0
subsetTask.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Task_operators.R
\name{subsetTask}
\alias{subsetTask}
\title{Subset data in task.}
\usage{
subsetTask(task, subset = NULL, features)
}
\arguments{
\item{task}{(\link{Task})\cr
The task.}
\item{subset}{(\link{integer} | \link{logical} | \code{NULL})\cr
Selected cases. Either a logical or an index vector.
By default \code{NULL} if all observations are used.}
\item{features}{(\link{character} | \link{integer} | \link{logical})\cr
Vector of selected inputs. You can either pass a character vector with the
feature names, a vector of indices, or a logical vector.\cr
In case of an index vector each element denotes the position of the feature
name returned by \link{getTaskFeatureNames}.\cr
Note that the target feature is always included in the
resulting task, you should not pass it here.
Default is to use all features.}
}
\value{
(\link{Task}). Task with subsetted data.
}
\description{
See title.
}
\examples{
task = makeClassifTask(data = iris, target = "Species")
subsetTask(task, subset = 1:100)
}
\seealso{
Other task:
\code{\link{getTaskClassLevels}()},
\code{\link{getTaskCosts}()},
\code{\link{getTaskData}()},
\code{\link{getTaskDesc}()},
\code{\link{getTaskFeatureNames}()},
\code{\link{getTaskFormula}()},
\code{\link{getTaskId}()},
\code{\link{getTaskNFeats}()},
\code{\link{getTaskSize}()},
\code{\link{getTaskTargetNames}()},
\code{\link{getTaskTargets}()},
\code{\link{getTaskType}()}
}
\concept{task}