[.spatial_cubble_df | R Documentation |
Accessors to a cubble object
## S3 method for class 'spatial_cubble_df'
data[i, j, drop = FALSE]
## S3 method for class 'temporal_cubble_df'
data[i, j, drop = FALSE]
## S3 replacement method for class 'spatial_cubble_df'
names(x) <- value
## S3 replacement method for class 'temporal_cubble_df'
names(x) <- value
## S3 replacement method for class 'cubble_df'
x[[i]] <- value
data |
an object of class |
i , j |
row and column selector |
drop |
logical. If |
x |
data frame. |
value |
a suitable replacement value: it will be repeated a whole
number of times if necessary and it may be coerced: see the
Coercion section. If |
For nested cubbles, [
will return a cubble object if the key
variable, thecoords
variables, and the ts
column all present.
If the cubble object is also an sf object, the sticky select behavior on
the sf column will preserve. For long cubbles, [
will return a cubble
object if the key
and index
variable both present.
When a cubble can't be created and the data is not an sf class,
[
will always return a tibble, even with single index selection.
climate_mel[c(1:3, 7)] # a nested cubble
make_spatial_sf(climate_mel)[1:3] # an sf
long <- climate_mel |> face_temporal()
long[1:3] # a long cubble
climate_mel[1:3] # tibble
long[2:5] # tibble
climate_mel[1] # still tibble
long[1] # and still tibble
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.