Examples for 'stars::c.stars'


combine multiple stars objects, or combine multiple attributes in a single stars object into a single array

Aliases: c.stars c.stars_proxy

Keywords:

### ** Examples

tif = system.file("tif/L7_ETMs.tif", package = "stars")
x = read_stars(tif)
(new = c(x, x))
stars object with 3 dimensions and 2 attributes
attribute(s):
               Min. 1st Qu. Median     Mean 3rd Qu. Max.
L7_ETMs.tif       1      54     69 68.91242      86  255
L7_ETMs.tif.1     1      54     69 68.91242      86  255
dimension(s):
     from  to  offset delta                     refsys point x/y
x       1 349  288776  28.5 SIRGAS 2000 / UTM zone 25S FALSE [x]
y       1 352 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE [y]
band    1   6      NA    NA                         NA    NA    
c(new) # collapses two arrays into one with an additional dimension
stars object with 3 dimensions and 2 attributes
attribute(s):
               Min. 1st Qu. Median     Mean 3rd Qu. Max.
L7_ETMs.tif       1      54     69 68.91242      86  255
L7_ETMs.tif.1     1      54     69 68.91242      86  255
dimension(s):
     from  to  offset delta                     refsys point x/y
x       1 349  288776  28.5 SIRGAS 2000 / UTM zone 25S FALSE [x]
y       1 352 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE [y]
band    1   6      NA    NA                         NA    NA    
c(x, x, along = 3)
stars object with 3 dimensions and 1 attribute
attribute(s), summary of first 1e+05 cells:
             Min. 1st Qu. Median    Mean 3rd Qu. Max.
L7_ETMs.tif    47      65     76 77.3419      87  255
dimension(s):
     from  to  offset delta                     refsys point x/y
x       1 349  288776  28.5 SIRGAS 2000 / UTM zone 25S FALSE [x]
y       1 352 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE [y]
band    1  12      NA    NA                         NA    NA    

[Package stars version 0.6-7 Index]