I have a combined dataframe that contains elevation data from SRTM for the US. However, the total size of my dataframe is 115200000 rows. This amount of data gives an error when plotting ''Error: vector memory exhausted (limit reached?)''. Therefore I want to resize it. Here is a copy of my dataframe:
structure(list(X = c(-139.995833333333, -139.9875, -139.979166666667,
-139.970833333333, -139.9625, -139.954166666667, -139.945833333333,
-139.9375, -139.929166666667, -139.920833333333, -139.9125, -139.904166666667,
-139.895833333333, -139.8875, -139.879166666667, -139.870833333333,
-139.8625, -139.854166666667, -139.845833333333, -139.8375),
Y = c(89.9958333333333, 89.9958333333333, 89.9958333333333,
89.9958333333333, 89.9958333333333, 89.9958333333333, 89.9958333333333,
89.9958333333333, 89.9958333333333, 89.9958333333333, 89.9958333333333,
89.9958333333333, 89.9958333333333, 89.9958333333333, 89.9958333333333,
89.9958333333333, 89.9958333333333, 89.9958333333333, 89.9958333333333,
89.9958333333333), Elevation = c(0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), row.names = c(NA, 20L
), class = "data.frame")
These are 20 lines. How can I for example resize it so it has only 4 lines which are the average of every 5 lines?
Hope you can help me out!