Learn R Programming

stars (version 0.6-0)

dplyr: dplyr verbs for stars objects

Description

dplyr verbs for stars objects; package dplyr needs to be loaded before these methods can be used for stars objects.

Usage

filter.stars(.data, ...)

filter.stars_proxy(.data, ...)

mutate.stars(.data, ...)

mutate.stars_proxy(.data, ...)

transmute.stars(.data, ...)

transmute.stars_proxy(.data, ...)

select.stars(.data, ...)

select.stars_proxy(.data, ...)

rename.stars(.data, ...)

rename.stars_proxy(.data, ...)

pull.stars(.data, var = -1)

pull.stars_proxy(.data, ...)

as.tbl_cube.stars(x, ...)

slice.stars(.data, along, index, ..., drop = length(index) == 1)

slice.stars_proxy(.data, along, index, ...)

replace_na.stars(data, replace, ...)

replace_na.stars_proxy(data, ...)

Arguments

.data

object of class stars

...

see filter

var

see pull

x

object of class stars

along

name or index of dimension to which the slice should be applied

index

integer value(s) for this index

drop

logical; drop dimensions that only have a single index?

data

data set to work on

replace

see replace_na: list with variable=value pairs, where value is the replacement value for NA's

Examples

Run this code
tif = system.file("tif/L7_ETMs.tif", package = "stars")
x1 = read_stars(tif)
if (require(dplyr, quietly = TRUE)) {
 x1 %>% slice("band", 2:3)
 x1 %>% slice("x", 50:100)
}

Run the code above in your browser using DataLab