Description Usage Arguments Value
Extract observed data for use in a classification (training or testing)
1 | get_pixels(x, polys, class_col, training = 1, src = "none")
|
x |
a |
polys |
a |
class_col |
the name of the column containing the response variable (for example the land cover type of each pixel) |
training |
indicator of which polygons to use in training. Can be: 1) a string giving the name of a column indicating whether each polygon is to be used in training (rows equal to 1) or in testing (rows equal to FALSE), or 2) a logical vector of length equal to length(polys), or 3) a number between 0 and 1 indicating the fraction of the polygons to be randomly selected for use in training. |
src |
name of this data source. Useful when gathering training data from multiple images. |
a link{pixel_data}
object
will contain the the @examples
set.seed(1)
train_data <- get_pixels(L5TSR_1986, L5TSR_1986_2001_training, "class_1986",
training=.6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.