Displaying 20 results from an estimated 5000 matches similar to: "Please help with a basic function"
2009 Mar 24
1
Variogram with Gstat
Dear all can you help me? i have this problem: i have a dataset in a text file
in a matrix of 3 columns: x, y, z where x and y are the coordinates and Z are
the mesurements. How can i do a variogram with R?
2009 Jun 10
2
plot two variograms on a same graph
Hi,
I would know how to plot two variograms on a same graph. I can plot one by one but I would draw both on the same one.
Is it possible? Do i need any special package?
Thanks!
Cordialement
Damien Landais
2006 Apr 25
3
persp plot increasing 'x' and 'y' values expected
hello,
i do the following in order to get an persp-plot
x<-c(2,2,2,2,2,2,3,3,3,3)
y<-c(41,41,83,83,124,166,208,208,208,208)
z<-c(90366,90366,92240,92240,92240,96473,100995,100995,100995,100995)
x<-data$x
y<-data$y
z<-matrix(data$z,length(y),length(x))
persp(x,y,z, col="gray")
but i always get the error message increasing 'x' and 'y' values
expected,
2008 Apr 01
1
spatial cross-correlation
Hi;
I cannot find in the R html documentation a way to evaluate
cross-correlation in 2D data sets.
I would like to evaluate cross-correlation in a series of moving windows
between two maps.
i,e, specify several windows inside the complete 2D spatial matrixes and
for each one ofthese windows evaluate the 2D cross-correlation (commonly
conducted in the spectral domain).
Thanks in advance and best
2008 May 05
3
troubles with R CMD check and examples under Ubuntu gutsy
Dear listers,
I was used to package pgirmess under Windows with everything OK, but,
for the first time, I had a trial this afternoon on Ubuntu 7.10 gutsy (I
have a double boot computer and work more and more under unix) and R
2.7.0. Everything went OK except this:
sudo R CMD check pgirmess
.....
* checking examples ... ERROR
Running examples in 'pgirmess-Ex.R' failed.
The error most
2007 Jan 05
1
gstat package. "singular" attibute
Hello,
I'm using the gstat package within R for an automated procedure that
uses ordinary kriging.
I can see that there is a logical ("singular") atrtibute of some
adjusted model semivariograms:
.- attr(*, "singular")= logi TRUE
I cannot find documentation about the exact meaning and the implications
of this attribute, and I dont know anything about the inner calculations
2007 Oct 05
1
using spplot (sp package) with 5 quantiles
Hi,
I'm using R 2.5.1 and gstat 0.9-39 library and I'm working with the
jura data set provided by gstat library.
I tried to plot a graph of metal concentrations (let's say Cd) with
the command spplot, but I realized that the default lags are equally
distributed between Min and Max. I did:
library(gstat)
data(jura)
jura.pred.xy <- jura.pred
names(jura.pred.xy)[1:2] <-
2009 Sep 08
1
gstat---2 basic plot questions
Hi all--
I'm new to R, statistics and programming, so sorry if this is a really basic
question!
I have plotted a directional variogram, and I want to
a. overlay the omni-directional line over each directional panel
b. display the directional variograms in a single panel with a legend that
associated each line to each degree measurement.
The line I'm using is
2011 Oct 05
2
kriging shapefiles
Hi! Im new to R and I need to interpolate a shapefile using kriging. I've been able to plot/read the shapefile using the package maptools or rgdal. I've searched the internet for sample codes but most of the kriging codes that I've found done in R is done using txtfiles or CSVs. An example could be of great help. Thanks.
[[alternative HTML version deleted]]
2010 Jan 27
2
plotting the coordinates versus dates
Hello!
I have a dataset with the dates and positions - Lat and Long columns
How do I make a scatter plot?
Do I have to cbind to combine the Lat and Long columns?
Any suggestions will be much appreciated!
Thank you
Julia
[[alternative HTML version deleted]]
2006 Aug 20
3
plot problem
Hello.
I'm pretty much new to R and I'm trying to produce some figures.
It seems to me, that R has some asynchronous way of plotting figures.
When I run this code:
#constructs the semivariogram of SC1929
vgm1 <- variogram(SC1929~1,~U+V,puerto.map$att.data)
# trying to make new plot
dev.set(which=dev.next())
plot(vgm1)
title(main="Semivariogram",font.main=4)
2003 Mar 07
1
REML option in gstat
Hi, please help!!
I've been trying to fit variogram models using the REML method in the gstat
package. Every time the Windows GUI crashes. For example
library(gstat)
data(meuse)
x <- variogram(zinc ~ 1, ~x + y, meuse)
v <- vgm(140000, "Sph", 800, nug = 10000)
plot(x, model = fit.variogram(x, model = v, fit.method=5))
Other fit methods are non problematic (eg. fit.method=7
2006 Nov 24
2
plot() and Jpeg() increase font size and resolution
Dear list,
I am having troubles increasing the fontize when plotting a
variogram{gstat} and its model (vgm) with plot and using jpeg(). Also
the resolution in the jpeg call does not work. I am using R2.4 on
Mandriva 10.2 linux.
I can change fontsize with cex.axis in a normal plot, so I presume it
has to do with plotting the variogram model. Any help on how to increase
the font size and
2008 Jun 23
3
subset with multiple criteria
This should be theoretically very simple, but I dont get the elegant
answer (without looping).
I've got a long (thousands of rows) data frame:
> E.coor[1:10,]
east north dat
1 582650 4248850 0.8316848
2 582750 4248850 0.7230272
3 582850 4248850 0.3250818
4 582950 4248850 0.6144006
5 583050 4248850 0.8706312
6 583150 4248850 0.2149651
7 583250 4248850 0.1659519
8
2013 Apr 04
5
help with kriging interpolation
All,
I am new to using R and know some basics. I wish to use kriging in R to
do the following:
given data Y =f(X1,X2,X3,.....,Xn) --1000+ irregular measured data set.
I would like to be able to get a single value y given sinle input set
(x1,x2,x3,...xn)
A google search on this takes me lierally to the same example on involving
analysis with soil sampling and I cannot figure out how to
2006 Apr 13
2
a question on subset a dataset
Dear R-users,
I generate a dataset "d", and want to get a subset from it.
**
*z<-rnorm(9)
coords<-cbind(x=c(1,1,1,2,2,2,3,3,3),y=c(1,2,3,1,2,3,1,2,3))
d<-SpatialPointsDataFrame(coords, data.frame (z=z[1:9]))*
The result*/dataset* is
coordinates z
1 (1, 1) 1.41173570
2 (1, 2) 0.18546503
3 (1, 3) -0.04369144
4 (2, 1) -0.21591338
5 (2, 2)
2011 Nov 23
2
zeros to NA's - faster
Hello,
Is there a faster way to do this? Basically, I'd like to NA all values in
all_data if there are no 1's in the same column of the other matrix, iu.
Put another way, I want to replace values in the all_data columns if values
in the same column in iu are all 0. This is pretty slow for me, but works:
all_data = matrix(c(1:9),3,3)
colnames(all_data) =
2012 Mar 14
1
How to extend a slot of a class?
Hej hej,
is there a way to extend the SpatialPointsDataFrame data slot?This is the structure of an object of it:> str(coord)
Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots
..@ data :'data.frame': 214 obs. of 2 variables:
.. ..$ location.long: num [1:214] -79.8 -79.8 -79.8 -79.8 -79.8 ...
.. ..$ location.lat : num [1:214] 9.16 9.16 9.16
2006 Jan 10
0
new gstat version
Soon on CRAN a new version of package gstat will emerge, which
has a few minor changes and possible incompatibilities w.r.t. the
previous version(s).
The new gstat (0.9-23) now:
+ depends on sp, and uses internally with Spatial* classes from sp
if data are provided in the old-fashoned way (as data.frame)
+ has a vignette to get you started with the classes in sp
+ defines krige as a generic;
2006 Jan 10
0
new gstat version
Soon on CRAN a new version of package gstat will emerge, which
has a few minor changes and possible incompatibilities w.r.t. the
previous version(s).
The new gstat (0.9-23) now:
+ depends on sp, and uses internally with Spatial* classes from sp
if data are provided in the old-fashoned way (as data.frame)
+ has a vignette to get you started with the classes in sp
+ defines krige as a generic;