Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Melt array | |
#' | |
#' Long form version of an array in a data frame with explict row, col, etc. dimension | |
#' index identifiers. | |
#' | |
#' Degenerate dimensions are 'dropped' by default, which means there won't be an | |
#' explicit column recording their presence. If `drop = FALSE` the column will be present | |
#' (filled with `1`). | |
#' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(sf) | |
library(dplyr) | |
library(mapview) | |
library(mapedit) | |
qk_mx <- data.matrix(quakes[,2:1]) | |
qk_mp <- st_multipoint(qk_mx) | |
qk_sf <- st_sf(st_cast(st_sfc(qk_mp), "POINT"), quakes, crs=4326) | |
grd <- st_sf(geom=st_make_grid(qk_sf), crs=4326) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/Rscript --vanilla | |
########################################################### | |
## ## | |
## elastic.R ## | |
## ## | |
## Author: Tony Fischetti ## | |
## tony.fischetti@gmail.com ## | |
## ## | |
########################################################### |