> dput(df)
structure(list(fecha = c("2024-07-29T12:51:17", "2024-07-29T12:52:19",
"2024-07-29T12:52:19", "2024-07-29T12:53:14", "2024-07-29T12:53:14",
"2024-07-29T12:54:32", "2024-07-29T12:56:07", "2024-07-29T12:56:32",
"2024-07-29T12:57:34", "2024-07-29T13:01:21"), lat = c(42.5126,
42.4781, 42.4887, 42.5162, 42.5204, 42.4963, 42.4903, 42.5123,
42.5148, 42.4965), lon = c(-6.6907, -6.5679, -6.6065, -6.6177,
-6.6688, -6.6272, -6.616, -6.6607, -6.6161, -6.6434), peakCurrent = c(-12L,
-7L, -8L, -8L, -9L, -11L, -13L, 10L, -9L, -15L)), row.names = 2:11, class = "data.frame")
also
> dput(df_sf)
structure(list(fecha = c("2024-07-29T12:51:17", "2024-07-29T12:52:19",
"2024-07-29T12:52:19", "2024-07-29T12:53:14", "2024-07-29T12:53:14",
"2024-07-29T12:54:32", "2024-07-29T12:56:07", "2024-07-29T12:56:32",
"2024-07-29T12:57:34", "2024-07-29T13:01:21"), peakCurrent = c(-12L,
-7L, -8L, -8L, -9L, -11L, -13L, 10L, -9L, -15L), geometry = structure(list(
structure(c(-6.6907, 42.5126), class = c("XY", "POINT", "sfg"
)), structure(c(-6.5679, 42.4781), class = c("XY", "POINT",
"sfg")), structure(c(-6.6065, 42.4887), class = c("XY", "POINT",
"sfg")), structure(c(-6.6177, 42.5162), class = c("XY", "POINT",
"sfg")), structure(c(-6.6688, 42.5204), class = c("XY", "POINT",
"sfg")), structure(c(-6.6272, 42.4963), class = c("XY", "POINT",
"sfg")), structure(c(-6.616, 42.4903), class = c("XY", "POINT",
"sfg")), structure(c(-6.6607, 42.5123), class = c("XY", "POINT",
"sfg")), structure(c(-6.6161, 42.5148), class = c("XY", "POINT",
"sfg")), structure(c(-6.6434, 42.4965), class = c("XY", "POINT",
"sfg"))), n_empty = 0L, precision = 0, crs = structure(list(
input = "EPSG:4326", wkt = "GEOGCRS[\"WGS 84\",\n ENSEMBLE[\"World Geodetic System 1984 ensemble\",\n MEMBER[\"World Geodetic System 1984 (Transit)\"],\n MEMBER[\"World Geodetic System 1984 (G730)\"],\n MEMBER[\"World Geodetic System 1984 (G873)\"],\n MEMBER[\"World Geodetic System 1984 (G1150)\"],\n MEMBER[\"World Geodetic System 1984 (G1674)\"],\n MEMBER[\"World Geodetic System 1984 (G1762)\"],\n MEMBER[\"World Geodetic System 1984 (G2139)\"],\n ELLIPSOID[\"WGS 84\",6378137,298.257223563,\n LENGTHUNIT[\"metre\",1]],\n ENSEMBLEACCURACY[2.0]],\n PRIMEM[\"Greenwich\",0,\n ANGLEUNIT[\"degree\",0.0174532925199433]],\n CS[ellipsoidal,2],\n AXIS[\"geodetic latitude (Lat)\",north,\n ORDER[1],\n ANGLEUNIT[\"degree\",0.0174532925199433]],\n AXIS[\"geodetic longitude (Lon)\",east,\n ORDER[2],\n ANGLEUNIT[\"degree\",0.0174532925199433]],\n USAGE[\n SCOPE[\"Horizontal component of 3D system.\"],\n AREA[\"World.\"],\n BBOX[-90,-180,90,180]],\n ID[\"EPSG\",4326]]"), class = "crs"), bbox = structure(c(xmin = -6.6907,
ymin = 42.4781, xmax = -6.5679, ymax = 42.5204), class = "bbox"), class = c("sfc_POINT",
"sfc"))), row.names = 2:11, sf_column = "geometry", agr = structure(c(fecha = NA_integer_,
peakCurrent = NA_integer_), class = "factor", levels = c("constant",
"aggregate", "identity")), class = c("sf", "data.frame"))