How may one get from the input data frame of meuse.grid to a "stars" object, auto-generating the NAs:
library(sp)
data(meuse.grid)
# in sp
coordinates(meuse.grid) <- c("x", "y")
gridded(meuse.grid) <- TRUE
fullgrid(meuse.grid) <- TRUE
Making an sf is trivial, but trying to coerce to stars just takes the point geometries. What am I missing? I don't see this case in the fifth vignette.
don't go through sf:
library(sp)
data(meuse.grid)
coordinates(meuse.grid) <- c("x", "y")
gridded(meuse.grid) <- TRUE
fullgrid(meuse.grid) <- TRUE
library(stars)
# Loading required package: abind
# Loading required package: sf
# Linking to GEOS 3.8.1, GDAL 3.1.3, PROJ 7.1.1
(s <- st_as_stars(meuse.grid))
# stars object with 2 dimensions and 5 attributes
# attribute(s):
# part.a part.b dist soil ffreq
# Min. :0.000 Min. :0.000 Min. :0.000 1 :1665 1 : 779
# 1st Qu.:0.000 1st Qu.:0.000 1st Qu.:0.119 2 :1084 2 :1335
# Median :0.000 Median :1.000 Median :0.272 3 : 354 3 : 989
# Mean :0.399 Mean :0.601 Mean :0.297 NA's:5009 NA's:5009
# 3rd Qu.:1.000 3rd Qu.:1.000 3rd Qu.:0.440
# Max. :1.000 Max. :1.000 Max. :0.993
# NA's :5009 NA's :5009 NA's :5009
# dimension(s):
# from to offset delta refsys point values x/y
# x 1 78 178440 40 NA NA NULL [x]
# y 1 104 333760 -40 NA NA NULL [y]
plot(s["soil"])

Apologies for brevity; can I get straight from meuse.grid as a data.frame
to the stars representation without using sp to build the SGDF object?
Roger Bivand
Falsensvei 32
5063 Bergen
tir. 3. nov. 2020, 14:33 skrev Edzer Pebesma notifications@github.com:
don't go through sf:
library(sp)
data(meuse.grid)
coordinates(meuse.grid) <- c("x", "y")
gridded(meuse.grid) <- TRUE
fullgrid(meuse.grid) <- TRUE
library(stars)Loading required package: abind
Loading required package: sf
Linking to GEOS 3.8.1, GDAL 3.1.3, PROJ 7.1.1
(s <- st_as_stars(meuse.grid))
stars object with 2 dimensions and 5 attributes
attribute(s):
part.a part.b dist soil ffreq
Min. :0.000 Min. :0.000 Min. :0.000 1 :1665 1 : 779
1st Qu.:0.000 1st Qu.:0.000 1st Qu.:0.119 2 :1084 2 :1335
Median :0.000 Median :1.000 Median :0.272 3 : 354 3 : 989
Mean :0.399 Mean :0.601 Mean :0.297 NA's:5009 NA's:5009
3rd Qu.:1.000 3rd Qu.:1.000 3rd Qu.:0.440
Max. :1.000 Max. :1.000 Max. :0.993
NA's :5009 NA's :5009 NA's :5009
dimension(s):
from to offset delta refsys point values x/y
x 1 78 178440 40 NA NA NULL [x]
y 1 104 333760 -40 NA NA NULL [y]
plot(s["soil"])
[image: x]
https://user-images.githubusercontent.com/520851/97991190-5f616e80-1de1-11eb-8000-96a16d930843.png—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/r-spatial/stars/issues/347#issuecomment-721117537,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACNZ3BFSNFY47J5TYKDHJTDSOABBDANCNFSM4TIXZBAQ
.
Directly using the data frame meuse.grid
library(sp)
#> Warning: package 'sp' was built under R version 4.0.3
library(stars)
#> Loading required package: abind
#> Loading required package: sf
#> Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1
data(meuse.grid)
(s <- st_as_stars(meuse.grid))
#> stars object with 2 dimensions and 5 attributes
#> attribute(s):
#> part.a part.b dist soil
#> Min. :0.000 Min. :0.000 Min. :0.000 Min. :1.000
#> 1st Qu.:0.000 1st Qu.:0.000 1st Qu.:0.119 1st Qu.:1.000
#> Median :0.000 Median :1.000 Median :0.272 Median :1.000
#> Mean :0.399 Mean :0.601 Mean :0.297 Mean :1.578
#> 3rd Qu.:1.000 3rd Qu.:1.000 3rd Qu.:0.440 3rd Qu.:2.000
#> Max. :1.000 Max. :1.000 Max. :0.993 Max. :3.000
#> NA's :5009 NA's :5009 NA's :5009 NA's :5009
#> ffreq
#> Min. :1.000
#> 1st Qu.:1.000
#> Median :2.000
#> Mean :2.068
#> 3rd Qu.:3.000
#> Max. :3.000
#> NA's :5009
#> dimension(s):
#> from to offset delta refsys point values x/y
#> x 1 78 178440 40 NA NA NULL [x]
#> y 1 104 333760 -40 NA NA NULL [y]
plot(s["soil"])

Thanks! ;-)
Interestingly, we loose factors the second way; let's that make the issue of this issue.
Thanks. However, the data.frame I had was not ordered with the first column eastings, the second northings, more like:
> o <- st_as_stars(meuse.grid[, c(2,1,3:7)], xy=c("x", "y"))
> plot(o)
Error in plot.stars(o) :
no raster, no features geometries: no default plot method set up yet!
I tried other arguments too, but could only use stars::st_as_stars() on the input by re-ordering the columns to have, "x", "y", ...
Thanks; this now gives you
library(sp)
data(meuse.grid)
library(stars)
# Loading required package: abind
# Loading required package: sf
# Linking to GEOS 3.8.1, GDAL 3.1.3, PROJ 7.1.1
st_as_stars(meuse.grid[c(3,4,1,2)], dims = c(3,4))
# stars object with 2 dimensions and 2 attributes
# attribute(s):
# part.a part.b
# Min. :0.000 Min. :0.000
# 1st Qu.:0.000 1st Qu.:0.000
# Median :0.000 Median :1.000
# Mean :0.399 Mean :0.601
# 3rd Qu.:1.000 3rd Qu.:1.000
# Max. :1.000 Max. :1.000
# NA's :5009 NA's :5009
# dimension(s):
# from to offset delta refsys point values x/y
# x 1 78 178440 40 NA NA NULL [x]
# y 1 104 333760 -40 NA NA NULL [y]
try(st_as_stars(meuse.grid[c(3,4,1,2)], xy = c(3,4)))
# Error in st_as_stars.data.frame(meuse.grid[c(3, 4, 1, 2)], xy = c(3, 4)) :
# parameter xy only takes effect when the cube dimensions are set with dims
i.e., you need to specify dims, not xy.
Just a follow-up: where is the coordinate placed in "stars" objects:
library(sp)
data(meuse.grid)
meuse.gridSP = meuse.grid
coordinates(meuse.gridSP) <- c("x", "y")
gridded(meuse.gridSP) <- TRUE
spol <- as(meuse.gridSP[1:20,], "SpatialPolygons")
plot(spol)
library(stars)
meuse_stars <- st_as_stars(meuse.grid[1:20,])
meuse_sf <- st_as_sf(meuse_stars)
plot(st_geometry(meuse_sf), add=TRUE, border="brown")

We know that sp::gridded() takes the input points as cell centres, are the coordinates in stars::st_as_stars.data.frame() taken as NW corners?
Strange: I see this:

Is this stars from github?
It is inside x and y dimensions (st_dimensions(meuse_stars)$y$refsys), but you have to define it first with st_crs(meuse_stars) = 4326
library(sp)
#> Warning: package 'sp' was built under R version 4.0.3
library(stars)
#> Loading required package: abind
#> Loading required package: sf
#> Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1
data(meuse.grid)
meuse.gridSP = meuse.grid
coordinates(meuse.gridSP) <- c("x", "y")
gridded(meuse.gridSP) <- TRUE
spol <- as(meuse.gridSP[1:20,], "SpatialPolygons")
plot(spol)
meuse_stars <- st_as_stars(meuse.grid[1:20,])
st_crs(meuse_stars) = 4326
meuse_sf <- st_as_sf(meuse_stars)
plot(st_geometry(meuse_sf), add=TRUE, border="brown")

meuse_stars
#> stars object with 2 dimensions and 5 attributes
#> attribute(s):
#> part.a part.b dist soil ffreq
#> Min. :1 Min. :0 Min. :0.000000 1 :20 1 :20
#> 1st Qu.:1 1st Qu.:0 1st Qu.:0.009508 2 : 0 2 : 0
#> Median :1 Median :0 Median :0.037340 3 : 0 3 : 0
#> Mean :1 Mean :0 Mean :0.038082 NA's:15 NA's:15
#> 3rd Qu.:1 3rd Qu.:0 3rd Qu.:0.059366
#> Max. :1 Max. :0 Max. :0.103029
#> NA's :15 NA's :15 NA's :15
#> dimension(s):
#> from to offset delta refsys point values x/y
#> x 1 7 181000 40 WGS 84 NA NULL [x]
#> y 1 5 333760 -40 WGS 84 NA NULL [y]
st_dimensions(meuse_stars)$x$refsys
#> Coordinate Reference System:
#> User input: EPSG:4326
#> wkt:
#> GEOGCRS["WGS 84",
#> DATUM["World Geodetic System 1984",
#> ELLIPSOID["WGS 84",6378137,298.257223563,
#> LENGTHUNIT["metre",1]]],
#> PRIMEM["Greenwich",0,
#> ANGLEUNIT["degree",0.0174532925199433]],
#> CS[ellipsoidal,2],
#> AXIS["geodetic latitude (Lat)",north,
#> ORDER[1],
#> ANGLEUNIT["degree",0.0174532925199433]],
#> AXIS["geodetic longitude (Lon)",east,
#> ORDER[2],
#> ANGLEUNIT["degree",0.0174532925199433]],
#> USAGE[
#> SCOPE["unknown"],
#> AREA["World"],
#> BBOX[-90,-180,90,180]],
#> ID["EPSG",4326]]
st_dimensions(meuse_stars)$y$refsys
#> Coordinate Reference System:
#> User input: EPSG:4326
#> wkt:
#> GEOGCRS["WGS 84",
#> DATUM["World Geodetic System 1984",
#> ELLIPSOID["WGS 84",6378137,298.257223563,
#> LENGTHUNIT["metre",1]]],
#> PRIMEM["Greenwich",0,
#> ANGLEUNIT["degree",0.0174532925199433]],
#> CS[ellipsoidal,2],
#> AXIS["geodetic latitude (Lat)",north,
#> ORDER[1],
#> ANGLEUNIT["degree",0.0174532925199433]],
#> AXIS["geodetic longitude (Lon)",east,
#> ORDER[2],
#> ANGLEUNIT["degree",0.0174532925199433]],
#> USAGE[
#> SCOPE["unknown"],
#> AREA["World"],
#> BBOX[-90,-180,90,180]],
#> ID["EPSG",4326]]
Session info
devtools::session_info()
#> - Session info ---------------------------------------------------------------
#> setting value
#> version R version 4.0.2 (2020-06-22)
#> os Windows 10 x64
#> system x86_64, mingw32
#> ui RTerm
#> language (EN)
#> collate English_United States.1252
#> ctype English_United States.1252
#> tz Europe/Berlin
#> date 2020-11-05
#>
#> - Packages -------------------------------------------------------------------
#> package * version date lib source
#> abind * 1.4-5 2016-07-21 [1] CRAN (R 4.0.0)
#> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.0.2)
#> backports 1.1.10 2020-09-15 [1] CRAN (R 4.0.3)
#> callr 3.5.1 2020-10-13 [1] CRAN (R 4.0.3)
#> class 7.3-17 2020-04-26 [2] CRAN (R 4.0.2)
#> classInt 0.4-3 2020-04-07 [1] CRAN (R 4.0.2)
#> cli 2.1.0 2020-10-12 [1] CRAN (R 4.0.3)
#> crayon 1.3.4 2017-09-16 [1] CRAN (R 4.0.2)
#> curl 4.3 2019-12-02 [1] CRAN (R 4.0.2)
#> DBI 1.1.0 2019-12-15 [1] CRAN (R 4.0.2)
#> desc 1.2.0 2018-05-01 [1] CRAN (R 4.0.2)
#> devtools 2.3.2 2020-09-18 [1] CRAN (R 4.0.2)
#> digest 0.6.27 2020-10-24 [1] CRAN (R 4.0.3)
#> dplyr 1.0.2 2020-08-18 [1] CRAN (R 4.0.2)
#> e1071 1.7-4 2020-10-14 [1] CRAN (R 4.0.3)
#> ellipsis 0.3.1 2020-05-15 [1] CRAN (R 4.0.2)
#> evaluate 0.14 2019-05-28 [1] CRAN (R 4.0.2)
#> fansi 0.4.1 2020-01-08 [1] CRAN (R 4.0.2)
#> fs 1.5.0 2020-07-31 [1] CRAN (R 4.0.2)
#> generics 0.0.2 2018-11-29 [1] CRAN (R 4.0.2)
#> glue 1.4.2 2020-08-27 [1] CRAN (R 4.0.2)
#> highr 0.8 2019-03-20 [1] CRAN (R 4.0.2)
#> htmltools 0.5.0 2020-06-16 [1] CRAN (R 4.0.2)
#> httr 1.4.2 2020-07-20 [1] CRAN (R 4.0.2)
#> KernSmooth 2.23-17 2020-04-26 [2] CRAN (R 4.0.2)
#> knitr 1.29 2020-06-23 [1] CRAN (R 4.0.2)
#> lattice 0.20-41 2020-04-02 [2] CRAN (R 4.0.2)
#> lifecycle 0.2.0 2020-03-06 [1] CRAN (R 4.0.2)
#> lwgeom 0.2-5 2020-06-12 [1] CRAN (R 4.0.2)
#> magrittr 1.5 2014-11-22 [1] CRAN (R 4.0.2)
#> memoise 1.1.0 2017-04-21 [1] CRAN (R 4.0.2)
#> mime 0.9 2020-02-04 [1] CRAN (R 4.0.0)
#> pillar 1.4.6 2020-07-10 [1] CRAN (R 4.0.2)
#> pkgbuild 1.1.0 2020-07-13 [1] CRAN (R 4.0.2)
#> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.0.2)
#> pkgload 1.1.0 2020-05-29 [1] CRAN (R 4.0.2)
#> prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.0.2)
#> processx 3.4.4 2020-09-03 [1] CRAN (R 4.0.2)
#> ps 1.4.0 2020-10-07 [1] CRAN (R 4.0.3)
#> purrr 0.3.4 2020-04-17 [1] CRAN (R 4.0.2)
#> R6 2.4.1 2019-11-12 [1] CRAN (R 4.0.2)
#> Rcpp 1.0.5 2020-07-06 [1] CRAN (R 4.0.2)
#> remotes 2.2.0 2020-07-21 [1] CRAN (R 4.0.2)
#> rlang 0.4.8 2020-10-08 [1] CRAN (R 4.0.3)
#> rmarkdown 2.3 2020-06-18 [1] CRAN (R 4.0.2)
#> rprojroot 1.3-2 2018-01-03 [1] CRAN (R 4.0.2)
#> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.2)
#> sf * 0.9-7 2020-11-04 [1] Github (r-spatial/sf@92959fd)
#> sp * 1.4-4 2020-10-07 [1] CRAN (R 4.0.3)
#> stars * 0.4-4 2020-11-04 [1] Github (r-spatial/stars@4eaaa76)
#> stringi 1.5.3 2020-09-09 [1] CRAN (R 4.0.3)
#> stringr 1.4.0 2019-02-10 [1] CRAN (R 4.0.2)
#> testthat 2.3.2 2020-03-02 [1] CRAN (R 4.0.2)
#> tibble 3.0.4 2020-10-12 [1] CRAN (R 4.0.3)
#> tidyselect 1.1.0 2020-05-11 [1] CRAN (R 4.0.2)
#> units 0.6-7 2020-06-13 [1] CRAN (R 4.0.2)
#> usethis 1.6.3 2020-09-17 [1] CRAN (R 4.0.2)
#> vctrs 0.3.4 2020-08-29 [1] CRAN (R 4.0.2)
#> withr 2.3.0 2020-09-22 [1] CRAN (R 4.0.3)
#> xfun 0.18 2020-09-29 [1] CRAN (R 4.0.3)
#> xml2 1.3.2 2020-04-23 [1] CRAN (R 4.0.2)
#> yaml 2.2.1 2020-02-01 [1] CRAN (R 4.0.2)
#>
#> [1] E:/Documents/R/win-library/4.0
#> [2] C:/Program Files/R/R-4.0.2/library
Yes, stars_0.4-4, I'm unsure when installed.
When there is no CRS, it should not assume anything. I prefer 32662 anyway as a flat projection. We should never, ever assume 4326, I'm dealing with archaeological data in local surveying coordinates.
library(sp)
#> Warning: package 'sp' was built under R version 4.0.3
library(stars)
#> Loading required package: abind
#> Loading required package: sf
#> Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1
data(meuse.grid)
meuse.gridSP = meuse.grid
coordinates(meuse.gridSP) <- c("x", "y")
gridded(meuse.gridSP) <- TRUE
spol <- as(meuse.gridSP[1:20,], "SpatialPolygons")
plot(spol)
meuse_stars <- st_as_stars(meuse.grid[1:20,])
st_crs(meuse_stars) = 32662
meuse_sf <- st_as_sf(meuse_stars)
plot(st_geometry(meuse_sf), add=TRUE, border="brown")

meuse_stars
#> stars object with 2 dimensions and 5 attributes
#> attribute(s):
#> part.a part.b dist soil ffreq
#> Min. :1 Min. :0 Min. :0.000000 1 :20 1 :20
#> 1st Qu.:1 1st Qu.:0 1st Qu.:0.009508 2 : 0 2 : 0
#> Median :1 Median :0 Median :0.037340 3 : 0 3 : 0
#> Mean :1 Mean :0 Mean :0.038082 NA's:15 NA's:15
#> 3rd Qu.:1 3rd Qu.:0 3rd Qu.:0.059366
#> Max. :1 Max. :0 Max. :0.103029
#> NA's :15 NA's :15 NA's :15
#> dimension(s):
#> from to offset delta refsys point values x/y
#> x 1 7 181000 40 WGS 84 / Plate Carree NA NULL [x]
#> y 1 5 333760 -40 WGS 84 / Plate Carree NA NULL [y]
st_dimensions(meuse_stars)$x$refsys
#> Coordinate Reference System:
#> User input: EPSG:32662
#> wkt:
#> PROJCRS["WGS 84 / Plate Carree",
#> BASEGEOGCRS["WGS 84",
#> DATUM["World Geodetic System 1984",
#> ELLIPSOID["WGS 84",6378137,298.257223563,
#> LENGTHUNIT["metre",1]]],
#> PRIMEM["Greenwich",0,
#> ANGLEUNIT["degree",0.0174532925199433]],
#> ID["EPSG",4326]],
#> CONVERSION["World Equidistant Cylindrical (Sphere)",
#> METHOD["Equidistant Cylindrical (Spherical)",
#> ID["EPSG",9823]],
#> PARAMETER["Latitude of natural origin",0,
#> ANGLEUNIT["degree",0.0174532925199433],
#> ID["EPSG",8801]],
#> PARAMETER["Longitude of natural origin",0,
#> ANGLEUNIT["degree",0.0174532925199433],
#> ID["EPSG",8802]],
#> PARAMETER["False easting",0,
#> LENGTHUNIT["metre",1],
#> ID["EPSG",8806]],
#> PARAMETER["False northing",0,
#> LENGTHUNIT["metre",1],
#> ID["EPSG",8807]]],
#> CS[Cartesian,2],
#> AXIS["easting (X)",east,
#> ORDER[1],
#> LENGTHUNIT["metre",1]],
#> AXIS["northing (Y)",north,
#> ORDER[2],
#> LENGTHUNIT["metre",1]],
#> USAGE[
#> SCOPE["unknown"],
#> AREA["World"],
#> BBOX[-90,-180,90,180]],
#> ID["EPSG",32662]]
st_dimensions(meuse_stars)$y$refsys
#> Coordinate Reference System:
#> User input: EPSG:32662
#> wkt:
#> PROJCRS["WGS 84 / Plate Carree",
#> BASEGEOGCRS["WGS 84",
#> DATUM["World Geodetic System 1984",
#> ELLIPSOID["WGS 84",6378137,298.257223563,
#> LENGTHUNIT["metre",1]]],
#> PRIMEM["Greenwich",0,
#> ANGLEUNIT["degree",0.0174532925199433]],
#> ID["EPSG",4326]],
#> CONVERSION["World Equidistant Cylindrical (Sphere)",
#> METHOD["Equidistant Cylindrical (Spherical)",
#> ID["EPSG",9823]],
#> PARAMETER["Latitude of natural origin",0,
#> ANGLEUNIT["degree",0.0174532925199433],
#> ID["EPSG",8801]],
#> PARAMETER["Longitude of natural origin",0,
#> ANGLEUNIT["degree",0.0174532925199433],
#> ID["EPSG",8802]],
#> PARAMETER["False easting",0,
#> LENGTHUNIT["metre",1],
#> ID["EPSG",8806]],
#> PARAMETER["False northing",0,
#> LENGTHUNIT["metre",1],
#> ID["EPSG",8807]]],
#> CS[Cartesian,2],
#> AXIS["easting (X)",east,
#> ORDER[1],
#> LENGTHUNIT["metre",1]],
#> AXIS["northing (Y)",north,
#> ORDER[2],
#> LENGTHUNIT["metre",1]],
#> USAGE[
#> SCOPE["unknown"],
#> AREA["World"],
#> BBOX[-90,-180,90,180]],
#> ID["EPSG",32662]]
Session info
devtools::session_info()
#> - Session info ---------------------------------------------------------------
#> setting value
#> version R version 4.0.2 (2020-06-22)
#> os Windows 10 x64
#> system x86_64, mingw32
#> ui RTerm
#> language (EN)
#> collate English_United States.1252
#> ctype English_United States.1252
#> tz Europe/Berlin
#> date 2020-11-05
#>
#> - Packages -------------------------------------------------------------------
#> package * version date lib source
#> abind * 1.4-5 2016-07-21 [1] CRAN (R 4.0.0)
#> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.0.2)
#> backports 1.1.10 2020-09-15 [1] CRAN (R 4.0.3)
#> callr 3.5.1 2020-10-13 [1] CRAN (R 4.0.3)
#> class 7.3-17 2020-04-26 [2] CRAN (R 4.0.2)
#> classInt 0.4-3 2020-04-07 [1] CRAN (R 4.0.2)
#> cli 2.1.0 2020-10-12 [1] CRAN (R 4.0.3)
#> crayon 1.3.4 2017-09-16 [1] CRAN (R 4.0.2)
#> curl 4.3 2019-12-02 [1] CRAN (R 4.0.2)
#> DBI 1.1.0 2019-12-15 [1] CRAN (R 4.0.2)
#> desc 1.2.0 2018-05-01 [1] CRAN (R 4.0.2)
#> devtools 2.3.2 2020-09-18 [1] CRAN (R 4.0.2)
#> digest 0.6.27 2020-10-24 [1] CRAN (R 4.0.3)
#> dplyr 1.0.2 2020-08-18 [1] CRAN (R 4.0.2)
#> e1071 1.7-4 2020-10-14 [1] CRAN (R 4.0.3)
#> ellipsis 0.3.1 2020-05-15 [1] CRAN (R 4.0.2)
#> evaluate 0.14 2019-05-28 [1] CRAN (R 4.0.2)
#> fansi 0.4.1 2020-01-08 [1] CRAN (R 4.0.2)
#> fs 1.5.0 2020-07-31 [1] CRAN (R 4.0.2)
#> generics 0.0.2 2018-11-29 [1] CRAN (R 4.0.2)
#> glue 1.4.2 2020-08-27 [1] CRAN (R 4.0.2)
#> highr 0.8 2019-03-20 [1] CRAN (R 4.0.2)
#> htmltools 0.5.0 2020-06-16 [1] CRAN (R 4.0.2)
#> httr 1.4.2 2020-07-20 [1] CRAN (R 4.0.2)
#> KernSmooth 2.23-17 2020-04-26 [2] CRAN (R 4.0.2)
#> knitr 1.29 2020-06-23 [1] CRAN (R 4.0.2)
#> lattice 0.20-41 2020-04-02 [2] CRAN (R 4.0.2)
#> lifecycle 0.2.0 2020-03-06 [1] CRAN (R 4.0.2)
#> lwgeom 0.2-5 2020-06-12 [1] CRAN (R 4.0.2)
#> magrittr 1.5 2014-11-22 [1] CRAN (R 4.0.2)
#> memoise 1.1.0 2017-04-21 [1] CRAN (R 4.0.2)
#> mime 0.9 2020-02-04 [1] CRAN (R 4.0.0)
#> pillar 1.4.6 2020-07-10 [1] CRAN (R 4.0.2)
#> pkgbuild 1.1.0 2020-07-13 [1] CRAN (R 4.0.2)
#> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.0.2)
#> pkgload 1.1.0 2020-05-29 [1] CRAN (R 4.0.2)
#> prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.0.2)
#> processx 3.4.4 2020-09-03 [1] CRAN (R 4.0.2)
#> ps 1.4.0 2020-10-07 [1] CRAN (R 4.0.3)
#> purrr 0.3.4 2020-04-17 [1] CRAN (R 4.0.2)
#> R6 2.4.1 2019-11-12 [1] CRAN (R 4.0.2)
#> Rcpp 1.0.5 2020-07-06 [1] CRAN (R 4.0.2)
#> remotes 2.2.0 2020-07-21 [1] CRAN (R 4.0.2)
#> rlang 0.4.8 2020-10-08 [1] CRAN (R 4.0.3)
#> rmarkdown 2.3 2020-06-18 [1] CRAN (R 4.0.2)
#> rprojroot 1.3-2 2018-01-03 [1] CRAN (R 4.0.2)
#> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.2)
#> sf * 0.9-7 2020-11-04 [1] Github (r-spatial/sf@92959fd)
#> sp * 1.4-4 2020-10-07 [1] CRAN (R 4.0.3)
#> stars * 0.4-4 2020-11-04 [1] Github (r-spatial/stars@4eaaa76)
#> stringi 1.5.3 2020-09-09 [1] CRAN (R 4.0.3)
#> stringr 1.4.0 2019-02-10 [1] CRAN (R 4.0.2)
#> testthat 2.3.2 2020-03-02 [1] CRAN (R 4.0.2)
#> tibble 3.0.4 2020-10-12 [1] CRAN (R 4.0.3)
#> tidyselect 1.1.0 2020-05-11 [1] CRAN (R 4.0.2)
#> units 0.6-7 2020-06-13 [1] CRAN (R 4.0.2)
#> usethis 1.6.3 2020-09-17 [1] CRAN (R 4.0.2)
#> vctrs 0.3.4 2020-08-29 [1] CRAN (R 4.0.2)
#> withr 2.3.0 2020-09-22 [1] CRAN (R 4.0.3)
#> xfun 0.18 2020-09-29 [1] CRAN (R 4.0.3)
#> xml2 1.3.2 2020-04-23 [1] CRAN (R 4.0.2)
#> yaml 2.2.1 2020-02-01 [1] CRAN (R 4.0.2)
#>
#> [1] E:/Documents/R/win-library/4.0
#> [2] C:/Program Files/R/R-4.0.2/library
And after installing 0.4.3 from CRAN, I see the same (also with st_crs(meuse_stars) = 32662):

Installation from Github
library(remotes)
remotes::install_github("r-spatial/stars")
Yes, stars_0.4-4, I'm unsure when installed.
You need https://github.com/r-spatial/stars/commit/3f3f709d269434fe0b233809282abc845014242e#diff-2f393b6a08bfcb71107bb4d9bc7e2c875099ece7c37749d65f41c10464e1bd52 which is 10 days old.
... and (@alexyshr) the proper CRS for this dataset is EPSG:28992.