You could try the geojsonio package, which i've used for a few tasks involving sp/sf conversions.
# read in the geojson data and specify that you want to parse it
data <- geojson_read("C:\\filepath\\test.geojson", method = "local", parse = TRUE)
It has a strange old listed structure after parsing, here's my dummy polygon:
$type
[1] "FeatureCollection"
$crs
$crs$type
[1] "name"
$crs$properties
$crs$properties$name
[1] "urn:ogc:def:crs:OGC:1.3:CRS84"
$features
type id dummy geometry.type
1 Feature 1 0 Polygon
geometry.coordinates
1 16.4844, 22.5928, 24.7461, 17.4951, 16.4844, 59.7363, 61.1426, 55.0342, 55.1221, 59.7363
you can see the area of interest; list item named "features".
data$features is actually a data.frame, but the 4th column (so to speak) is another data.frame consisting of a character and a list. The list, our coordinates, is in fact an array. It's all rather nested.
# this accesses the geometry
data$features$geometry
type
1 Polygon
coordinates
1 16.4844, 22.5928, 24.7461, 17.4951, 16.4844, 59.7363, 61.1426, 55.0342, 55.1221, 59.7363
# and this accesses the list in which the array in which the coordinates are stored
data$features$geometry$coordinates[[1]]
, , 1
[,1] [,2] [,3] [,4] [,5]
[1,] 16.4844 22.5928 24.7461 17.4951 16.4844
, , 2
[,1] [,2] [,3] [,4] [,5]
[1,] 59.7363 61.1426 55.0342 55.1221 59.7363
So there we go. To access your coords, you can either call the entire array as a matrix, the individual coord pairs or all of the x/y coordinates:
# all coordinate pairs as matrix
data$features$geometry$coordinates[[1]][1,,]
# individual coordinate pairs (i've put 1:5 here illustratively, which is the same as above)
data$features$geometry$coordinates[[1]][,1:5,]
# all x or y coordinates (dont use word or!)
data$features$geometry$coordinates[[1]][,,1 or 2]
coordinates(data)