You should be able to read this using the sf
package as a vector data source.
Extracting the ZIP file of the chart I think you are referencing gets me a US5MD23M.000
file. With sf
package I can see its lots of layers:
> st_layers("US5MD23M.000")
Driver: S57
Available layers:
layer_name geometry_type features fields
1 DSID NA 1 36
2 BCNLAT Point 121 43
3 BCNSPP Point 10 43
4 BRIDGE 40 40
[etc etc]
You can read a layer by name:
> rivers = st_read("US5MD23M.000","RIVERS")
Reading layer `RIVERS' from data source
`/nobackup/rowlings/Downloads/ENC_ROOT/US5MD23M/US5MD23M.000'
using driver `S57'
Simple feature collection with 518 features and 24 fields
Geometry type: GEOMETRY
Dimension: XY
Bounding box: xmin: -76.1938 ymin: 38.23361 xmax: -75.5877 ymax: 38.64338
Geodetic CRS: WGS 84
> plot(rivers$geom)
You'll have to consult a data dictionary to find out what the layers and fields mean, if you need that information:
> names(rivers)
[1] "RCID" "PRIM" "GRUP" "OBJL" "RVER" "AGEN"
[7] "FIDN" "FIDS" "LNAM" "NOBJNM" "OBJNAM" "STATUS"
[13] "INFORM" "NINFOM" "NTXTDS" "SCAMAX" "SCAMIN" "TXTDSC"
[19] "RECDAT" "RECIND" "SORDAT" "SORIND" "LNAM_REFS" "FFPT_RIND"
[25] "geometry"
More info about reading S57 in R via GDAL here:
https://gdal.org/drivers/vector/s57.html#vector-s57