Skip to content

Instantly share code, notes, and snippets.

### Get a list of all your installed packages (so that you can reinstall them after updating R)
a <- installed.packages()
my_pkgs <- dimnames(a)[[1]]
save(my_pkgs, file="my_pkgs.RData")
load("my_pkgs.RData")
mypattern.qty <- spatstat::ppp(x=jitter(locs@coords[,1]),
y=jitter(locs@coords[,2]),
# round extent to nearest thousandth so resolution will work
#xrange=round(extent(locs)[1:2], -3)+ c(-1000,1000),
#yrange=round(extent(locs)[3:4],-3) + c(-1000,1000),
xrange=round(extent(locs)[1:2], -3)+ c(-10000,10000),
yrange=round(extent(locs)[3:4],-3) + c(-10000,10000),
marks=locs$qtykept)