c.stars | R Documentation |
combine multiple stars objects, or combine multiple attributes in a single stars object into a single array
## S3 method for class 'stars_proxy'
c(
...,
along = NA_integer_,
along_crs = FALSE,
try_hard = FALSE,
nms = names(list(...)),
tolerance = sqrt(.Machine$double.eps)
)
## S3 method for class 'stars'
c(
...,
along = NA_integer_,
try_hard = FALSE,
nms = names(list(...)),
tolerance = sqrt(.Machine$double.eps)
)
... |
object(s) of class |
along |
integer; see read_stars |
along_crs |
logical; if |
try_hard |
logical; if |
nms |
character; vector with array names |
tolerance |
numeric; values used in all.equal to compare dimension values combine those that dimensions matching to the first array |
An error is raised when attempting to combine arrays with different
measurement units into a single array. If this was intentded, drop_units
can be used to remove units of a stars
object before merging.
a single stars
object with merged (binded) arrays.
tif = system.file("tif/L7_ETMs.tif", package = "stars")
x = read_stars(tif)
(new = c(x, x))
c(new) # collapses two arrays into one with an additional dimension
c(x, x, along = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.