Displaying 20 results from an estimated 9000 matches similar to: "save to file"
2007 Oct 03
2
Speeding up simulation of mean nearest neighbor distances
I've written the function below to simulate the mean 1st through nth
nearest neighbor distances for a random spatial pattern using the
functions nndist() and runifpoint() from spatsat. It works, but runs
relatively slowly - would appreciate suggestions on how to speed up
this function. Thanks. --Dale
library(spatstat)
sim.nth.mdist <- function(nth,nsim) {
D <- matrix(ncol=nth,
2007 Mar 26
2
sampling from the uniform distribution over a convex hull
Ranjan Maitra writes:
> Does anyone have a suggestion (or better still) code for sampling
> from the uniform distribution over the convex hull of a set of
> points?
This is implemented in library 'spatstat'.
If x and y are vectors of coordinates of your initial set of points,
library(spatstat)
W <- convexhull.xy(x, y)
P <- runifpoint(42, W)
will compute
2005 Oct 10
3
Vectorizing loop
Hi
I have the following loop and would like to vectorize it. Any ideas if
it is possible?
Thanks,
Rainer
Tha Loop:
for (i in 2:Result$NoSims)
{
ppp <- runifpoint(Result$NoPlants)
K <- Kest(ppp)
Result$LSim[i,] <- sqrt(K$iso / pi) - K$r
CM <- (Result$LSim[i,] * Result$LSim[i,]) / abs(K$r[2] - K$r[1])
Result$SigCM[i] <- sum(CM, na.rm=TRUE)
print(i)
flush.console()
}
2004 May 29
1
Rhelp: Need help interpreting plots in spatstat
Hello everybody--
I have been playing with my data in spatstat, and what I'd like to
present is a basic exploratory spatial analysis. I have used the
following code, using a ppp.object called tsdspoints. The code
develops the simulations and the envelopes I want, but I don't
understand my first plot here, the [tsds.ghat.short$r,
tsds.ghat.short$raw]...I cobbled together this code
2005 Dec 29
3
importing shapefiles into spatstat
Dear R users,
I am using spatstat to analyze point patterns (tree locations). I would
like to import the shapefile with the study area polygons (six total) into R
and use it to create the window for the spatstat analysis. I do not simply
want to use a rectangle because the study areas spread out over 40000 ha.
Any suggestions would be greatly appreciated.
Thanks,
Charlotte Reemts
Charlotte
2008 May 14
1
for loop, my program does not make a cycle
Dear R community,
I wrote a small program using for loop but it does not make cycles.
My data: Dataframes: a2, a1, b0 and b1. Vector: d
I would like to get b1 for each of i., i.e. totally 11. However, the program gives me b1 only for the last i =11.
d<-as.vector(levels(a2$combin2))
for (i in 1:11){
a1<-a2[a2$combin2%in%d[i],]
b1<-b0[b0$Date%in%(a1$Date),]
}
Your help is
2007 Dec 09
1
spatstat questions
Um texto embutido e sem conjunto de caracteres especificado associado...
Nome: n?o dispon?vel
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20071209/130cf9d6/attachment.pl
2011 Sep 23
1
spatstat => owin + image
Dear Community
I am at my wits end and seek advice.
My wish is to plot coordinates (x,y in WGS84_UMTS for the ones interested)
of sampling points.
This I can do by the standard spatstat prodcedure via owin. I then try to
add an image, which is
a map/satellite photo in the background.
Firstly
Problem: With the current code, I can not get the edges of the image to
match the boarders of the plot
2017 Nov 28
0
Extract all point in a quadrats by spatstat package
Hi,
With the following code i can divides window into quadrats and counts the numbers of points in each quadrat.
library(spatstat)
X <- runifpoint(50)
quadratcount(X)
quadratcount(X, 4, 5)
quadratcount(X, xbreaks=c(0, 0.3, 1), ybreaks=c(0, 0.4, 0.8, 1))
qX <-? quadratcount(X, 4, 5)
plot(X)
plot(qX, add=TRUE)
But I want to mark each? quadrats? and select/ extract only those points by
2008 May 12
1
problem configuring package udunits
Hi R Users,
I am new to running R on a Linux platform (I'm used to Windows) - I'm running R
2.7.0 on Ubuntu 7.10 (Gutsy) as sudo (without Emacs). My architecture is
Pentium D (x86_64).
I am having problems successsfully configuring the downloaded package 'udunits'.
When I execute
> install.packages("udunits", lib="/usr/local/lib/R/library")
I get the
2013 Apr 15
2
nearest stations in distance matrix
Dear R-user,
Is there a way in R to locate the nearest 5 indices to a station, based on distances in a distance matrix. In other words i want to have nearest stations based on the distances in the matrix. The distance matrix, i have, has dimension 44*44.
Thankyou very much in advance
Elisa
[[alternative HTML version deleted]]
2005 Oct 10
5
Show Progress in loop
Hi
I have a loop which is doing time consuming calculations and I would
like to be able to have some feedback on where it is in it's
calculations. I tried to simply show the counter variable in the loop,
but id doesn't work as all display seems to be delayed until the loop is
completed. Is there any way of displaying the progress of a loop?
Rainer
The loop:
for (i in
2006 Apr 27
1
Symbol __f95_sign not found.
Our computing services people have recently reconfigured the Sun
compilers structure on our network, and I can no longer install, on
our Sun/Solaris machine, a certain package (spatstat) with which I am
heavily involved. (The same problem may well pertain to other
packages as well; I haven't yet experimented except with spatstat.)
Strictly speaking I can ***install*** it, but when I try
to
2007 Apr 04
6
transition matrices
I am working with transition matrices of sequences of animal
behaviours. What I would like to do is parse the original matrices,
adjusting row/column order so that the matrix has its main values in blocks
surrounding the diagonal. This would cause behaviours involved in
functional groupings (e.g. grooming, resting, foraging etc) to appear as
blocks.
This can be done manually by applying
2005 Mar 05
1
spatstat on Win98 (PR#7715)
Full_Name: Georg Roth
Version: R.2.0.1.for Windows
OS: Win98
Submission from: (NULL) (134.95.43.165)
Using libraries "spatstat" and "sm" on R.2.0.1. under Windows 98
bug 1)
the libraries "spatstat" and "sm" are not properly identified by the
"library()" command on R.2.0.1. (R for Windows98). the libraryname is shown in
upper case
2009 May 10
1
Spatstat
Hi all,
I am trying to install Spatstat on OpenSUSE 11.1.
install.packages("spatstat", dependencies = TRUE)
fails on the basis of various compiler packages (full message below).
I have gcc version 4.3.2, which should include gfortran and g++ - so I'm not
sure what to do!
Richard
* Installing *source* package ?deldir? ...
** libs
gfortran
2011 Mar 19
1
Undefined symbol "Rf_pythag" while loading spatstat
Today I installed the newest R develepment branch
R version 2.14.0 Under development (unstable) (2011-03-18 r54866)
on FreeBSD 9.0-CURRENT (amd64). All seems fine so far.
After that I updated my R packages with option 'checkBuilt=TRUE'. There
are four packages (spatstat, pscl, adehabitatLT, adehabitatHR) which
gives an error like this:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
2010 Jan 18
1
how to install spatstat
Hi,
I tried to install spatstat using:
install.packages("spatstat", dependencies = TRUE, lib =
"./R/i486-pc-linux-gnu-library/2.8")
but got the following msg:
--- Please select a CRAN mirror for use in this session ---
<here i selected one mirror, and tried several mirrors)
Loading Tcl/Tk interface ... done
Warning message:
In install.packages("spatstat",
2003 Dec 01
1
Re: using shapefile as owin
My sincerest apologies, as this is a very elementary problem, but I have
searched through archives and FAQs and on the web, and I am at the end of my
own resources.
I need to do analysis of a spatial point process occuring with four
counties, using spatstat. I've had no trouble importing the shapefiles, but
I can't seem to figure out what I need to do in order to use the boundary as
an
2012 May 09
1
Paquete Spatstat
Hola a toda la comunidad R, el siguiente problema tengo para hacer
funcionar el paquete Spatstat.
Tengo instalado R version 2.15.0, y Ubuntu 12.04 los cuales ya lo
actualice. El paquete (spatstat) esta instalado pero puntualmente es
problema es asi:
/
> library("spatstat")
Loading required package: mgcv
Error : .onLoad failed in loadNamespace() for ''Matrix'',