Displaying 20 results from an estimated 4000 matches similar to: "any good way to convert sp class objects to splancs object"
2008 Feb 17
1
random location in polygons sp spsample splancs csr
Dear all,
I had to place points at random, one in each of larger number of
polygons (actually in objects of class 'SpatialPolygonsDataFrame' , see
sp library), and tried first to do it using spsample (from sp).
Surprisingly, every 5-15 trials, the output was a NULL value. The doc
says that ' this may occur when trying to hit a small and awkwardly
shaped polygon in a large
2006 Oct 04
2
compiling rgdal package on windows / macos
Greetings:
As I am not a windows user, I cannot try this: is it possible to install rgdal
on windows without having to compile it from source ?
Compilation on MacOS is within my abilities, however each time i try and
install the rgdal package it dies complaining that it cannot find
gdal-config --- which was recently installed with GRASS. I have updated my
PATH environment variable, logged
2007 May 14
1
cross-validation / sensitivity anaylsis for logistic regression model
Hi,
I have developed a logistic regression model in the form of (factor_1~ numeric
+ factor_2) and would like to perform a cross-validation or some similar
form of sensitivity analysis on this model.
using cv.glm() from the boot package:
# dataframe from which model was built in 'z'
# model is called 'm_geo.lrm'
# as suggested in the man page for a binomial model:
cost <-
2006 May 23
1
standardization of values before call to pam() or clara()
Greetings,
Experimenting with the cluster package, and am starting to scratch my head in
regards to the *best* way to standardize my data. Both functions can
pre-standardize columns in a dataframe. according to the manual:
Measurements are standardized for each variable (column), by subtracting the
variable's mean value and dividing by the variable's mean absolute deviation.
This
2005 Nov 28
1
overlay additional axes
Greetings,
I am trying to add an extra labled axis in position 3 (top x-axis), with
numbers that do not match up with the existing axes.
Surely this must be possible, and I am just doing it incorectly.
So far I have tried the following:
#make a plot
plot(TIK, type="l", cex=.25, xlim=c(2,32), ylim=c(0,1600))
#try and add a new axis with different numbers in position 3
2006 Apr 10
2
passing known medoids to clara() in the cluster package
Greetings,
I have had good success using the clara() function to perform a simple cluster
analysis on a large dataset (1 million+ records with 9 variables).
Since the clara function is a wrapper to pam(), which will accept known medoid
data - I am wondering if this too is possible with clara() ... The
documentation does not suggest that this is possible.
Essentially I am trying to
2006 Sep 20
2
mysterious error on compile R 2.3.1
Getting a very strange error with a new install of R from source on x86;
make[3]: Leaving directory `/tmp/R.INSTALL.r20887/cluster/src'
** R
** data
** moving datasets to lazyload DB
Error in factor(c(1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1), :
invalid labels; length 2 should be 1 or 1
Execution halted
ERROR: lazydata failed for package 'cluster'
** Removing
2007 Feb 27
1
prop.test or chisq.test ..?
Hi everyone,
Suppose I have a count the occurrences of positive results, and the total
number of occurrences:
pos <- 14
total <- 15
testing that the proportion of positive occurrences is greater than 0.5 gives
a p-value and confidence interval:
prop.test( pos, total, p=0.5, alternative='greater')
1-sample proportions test with continuity correction
data: 14 out of
2007 Feb 14
1
model diagnostics for logistic regression
Greetings,
I am using both the lrm() {Design} and glm( , family=binomial()) to perform a
a logisitic regression in R. Apart from the typical summary() methods, what
other methods of diagnosing logistic regression models does R provide? i.e.
plotting an 'lm' object, etc.
Secondly, is there any facility to calculate the R^{2)_{L} as suggested by
Menard in "Applied Logistic
2007 May 28
1
off-topic: affine transformation matrix
This may sound like a very naive question, but...
give two lists of coordinate pairs (x,y - Cartesian space) is there any simple
way to compute the affine transformation matrix in R.
I have a set of data which is offset from where i know it should be. I have
coordinates of the current data, and matching coordinates of where the data
should be. I need to compute the composition of the affine
2006 Mar 02
1
extracting RGB values from a colorspace class object
Greetings,
After pouring over the documentation for the 'colorspace' package, I have not
been able to figure out how the plot() method converts colorspace coordinates
to RGB values for display on the screen. I am convert between colorspaces
with the various as() methods... but cannot seem to find a way to extract RGB
(i.e. for displaying on a computer screen) triplets from color space
2005 Sep 16
1
Question:manipulating spatial data using combination of Maptools and Splancs
Hi,
I have a problem that concerns combination of the package Maptools and
Splancs
I have 2 shapefiles that i want to manipulate (one of type point and one
polygon).I import them in R using Maptools but then i can't estimate a
quartic Kernel using Splancs. The package doesn't recognize the shapes
(invalid points and poly argument).I don't know if this is an easy task but
i have
2000 Sep 19
2
porting splancs library to R
I am trying to port the splancs library for S++ version 4.0 to R. I have modified the original FORTRAN to use dllwrap/dlltool (e.g. removed common blocks). I have been able to generate dll's (splancs.dll) using dllwrap/dlltool and Ming32 g77 with a -mdll switch. As of yet I have not been able to generate a dll that can be loaded by R.
Does anyone out there have any suggestions. An example
2006 Jul 31
1
questions regarding spline functions
Greetings,
A couple general questions regarding the use of splines to interpolate depth
profile data.
Here is an example of a set of depths, with associated attributes for a given
soil profile, along with a function for calculating midpoints from a set of
soil horizon boundaries:
#calculate midpoints:
mid <- function(x) {
for( i in 1:length(x)) {
if( i > 1) {
a[i] = (x[i] -
2007 Oct 08
1
do not plot polygon boundaries with spplot {sp}
Hi,
Is there a simple way to suppress the plotting of polygon boundaries with
spplot() ?
# simple list of 12 colors
cols <- brewer.pal(12, "Paired")
# plot pile of polygons, with 12 classes:
spplot(x, zcol='class2', col.regions=cols, scales=list(draw=T), xlab="Easting
(m)", ylab="Northing (m)")
... seems to work well. However the polygon boundaries
2001 Jun 02
2
inout() in splancs working properly?
I have a problem with function 'inout()' in package 'splancs' on CRAN-R
Version 1.2.3 under FreeBSD4.3-STABLE.
The following script produces and draws points and a polygon-surrounded
area. Repeating the same script many times shows, that points on the
polygon-line often, but not always, are outside of the polygon-area.
library(splancs)
# dataset with polygon (convex
2006 Nov 07
0
evaluation of 2 matrices: categorical comparison
Greetings,
I have two matrices, read in from raster data stored in GRASS. Each matrix
represents the output of a aggregation process on categorical data (Nomial /
Ordinal) - derived from imagery.
I have compared these two data by the following methods:
***** pretending the data is continuous approaches (flawed i am sure...)
1. computing a difference map by computing the absolute difference
2009 Mar 30
1
Warning messages in Splancs package :: no non-missing arguments to min; returning Inf
Hi,
I would need some help with the splans package in R.
I am using a Shapefile (downloadable at)
http://rapidshare.com/files/215206891/Redlands_Crime.zip
and the following execution code
setwd("C:\\Documents and
Settings\\Dejan\\Desktop\\GIS\\assignment6\\DataSet_Redlands_Crime\\Redlands_Crime")
library(foreign)
library(splancs)
auto_xy<-read.dbf("Auto_theft_98.dbf")
2013 Feb 21
2
error with bbox for k12hat (splancs) bivarite k-function
Hello,
I am trying to conduct a bi-variate ripley's k using the k12hat function in
the splancs package (found here
http://rss.acs.unt.edu/Rdoc/library/splancs/html/k12hat.html). Although, I
receive an error when getting to the bboxx part of the code:
poly <- list(x=c(fire4$X, nar4$X), y=c(fire4$Y, nar4$Y))
plot(seq(5,80,5), sqrt(k12hat(fire4), as.points(nar4),
2007 Dec 17
1
polygon class in splancs package
Dear forum,
I would like to use the kernel2d or spkernel2d in the Splancs-package, but
it does not recognize my polygon data.
"Error in kernel2d(as.points(ptsbin), polygonprov, h0 = 2, nx = 100, : " is
the error message.
Invalid poly argument
The data are defined as follows:
polgonprov<-list(x=polyprov$X, y=polyprov$Y) with X and Y coordinates in the
Lambert1972