Displaying 20 results from an estimated 2000 matches similar to: "How to use filled.contour(x,y,z) data for levelplot(z)?"
2010 Jan 07
0
setting different environments
Hallo,
I have a set of S4 and S3 classes together in one script.
While running this script I create a lot of new functions and objects
An example for S3 and S4 classes:
## S3 classes
pt <- list(x=1,y=2)
class(pt) <- "xypoint"
xpos <- function(x, ...) UseMethod("xpos")
xpos.xypoint <- function(x) x$x
ypos <- function(x, ...) UseMethod("ypos")
2005 Nov 11
3
problems with for: warnings and segfault
Hi,
I have two problem with a for looping using R Version 2.1.1 (2005-06-20) on a
Debian Linux Testing.
The first problem: warnings messages
Look:
> xcoord <- 5
> ycoord <- 5
> indice <- 1
> for(i in c(1:5)) {indice <- indice+1;xcoord[indice] <- xcoord+i;
ycoord[indice] <- ycoord }
Warning messages:
1: number of items to replace is not a multiple of replacement
2008 Dec 15
1
Semi-random movement inside a circle
Dear list,
I am trying to program semi-random movement within a circle, with no particles leaving the circle. I would like them to bounce back when they come to close to the wall, but I don't seem to be able to get this right. Would somebody kindly give me a hint ? This is my code so far, the particle starts at some point and moves towards the wall, but I don't get the "bouncing
2008 Dec 15
1
Movement within a circle
Dear list,
?
I am trying to program semi-random movement within a circle, with no particles leaving the circle. I would like them to bounce back when they come to close to the wall, but?I don't seem to be able to get this right. ?Would somebody?be able to?give me a hint ? This is my code so far, the particle starts at some point and moves towards the wall, but I don't get the
2006 Sep 07
2
merging tables by columns AND rows
Hi everyone!
I have 100 tables of the form:
XCOORD,YCOORD,OBSERVATION
27.47500,42.52641,177
27.48788,42.52641,177
27.50075,42.52641,179
27.51362,42.52641,178
27.52650,42.52641,180
27.53937,42.52641,178
27.55225,42.52641,181
27.56512,42.52641,177
27.57800,42.52641,181
27.59087,42.52641,181
27.60375,42.52641,180
27.61662,42.52641,181
..., ..., ...
with approximately 1000000 observations for each.
2009 Oct 28
2
Re ading and Creating Shape Files
Hello R Community,
I have imported a dataset which contain X Y coordinates and would like to
recreate a shape file after some data analysis. What i have done is to
import some taxlot data and join them based on some criteria. I want to
check to see how well the joining went by reviewing the results in GIS.
A couple things. I cant seem to import a shape file correctly using the
maptools
2002 Dec 14
1
adding contour lines to a filled.contour
Hi all,
Does anybody know how to add contour lines to a filled contour plot?
I want to draw a single contour around values that are above a certain
level (e.g., significant). The problem I'm having is that since the
filled.contour command actually draws two plots (data and the key),
adding contour lines paints them over both plots.
Any suggestions?
Thanks, Andy
#~~~~~~~~~~~~~~~~~~~
2001 Feb 22
1
Graphical parameters in perspective plot
Hello,
I've a problem for setting graphical parameters in perspective plot
(function persp).
I wonder if it's possible to add some text (function text) on an
existing persp plot USING the axis coordinates.
In fact I want to add some text on a persp plot according to x
coordinates.
I've tried to use text(xcoord,ycoord, label="toto") but the toto text
doesn't appear at
2007 Jan 15
0
spatial correlaton in lme and gls
Hello,
I have multiple observations (replicates) per station...and the stations are distributed in space.
I've applied models using lme and gls from the nlme library. I've messed around with compound symmetry to capture the correlation within stations. My question is.....I have x and y coordinates for each station (the subsamples have nearly the same coordinates)...how do you
2004 Jun 30
0
R crashes (PR#7037)
Full_Name: thomas cornulier
Version: 1.9.0 and 1.9.1
OS: Win XP
Submission from: (NULL) (194.254.155.62)
the following function produces R crashes under windows XP
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 1
minor 9.1
year 2004
month 06
day
2008 Jul 25
0
Error in vector("double", length)
Please see the code below.
When I try to run the variogram - vg.deft<-variog(rd,uvec=10)
I keep getting this error-
variog: computing omnidirectional variogram
Error in vector("double", length) : vector size specified is too large
Also, when I try to define distance-based neighborhood -
nb.tr=dist.neighbors(tr.locs,2)
I get this error -
Error in vector("double", length) :
2009 Mar 01
1
projecting GIS coordinates for analysis with spatstat package
I am working on creating an R package for doing fire department analysis and
am trying to create a function that can display emergency incident
densities. The following code sort of does the trick, but I need a display
that shows the number of incidents per square mile. I believe the code
below shows incidents per square unit (in this case, degrees lat/long).
To solve this problem, I believe
2005 Apr 20
1
overlaying a contour line in a levelplot
Hello there,
I am creating a series of images using levelplot but I also want to
overlay a contour for a particular value as reference. Here is the
levelplot command for the image:
print(levelplot(d~x+y,data=t,cuts=20,scales=list(draw=F),xlab=NULL,ylab=
NULL,col.regions=heat.colors(100)[100:1]),split=c(1,1,1,1),more=T)
and then to add the contour plot (I only want a contour at level 5):
2004 Aug 31
1
add single contour line to levelplot
Hello,
I want to add a single contour line to a levelplot but can't figure out
how to do it 'on-the-fly'. When I include the last line in the code below,
I get the following error:
Error in NextMethod("[") : Argument "subscripts" is missing, with no default
Any tips on how to fix this are greatly appreciated!
Ian Jonsen
2006 Feb 12
1
contour lines for levelplot
Hi,
I would like to add contour lines to a (trellis/lattice-) levelplot.
Sure, there is the "contour=TRUE" argument, but this uses
"cuts=..." (which is usually chosen very high for my plots. I guess
cuts=99 is the best you can do (?)) for plotting the contour lines.
Furthermore, I do not like the numbering of the contour lines this
way. Therefore, I tried to add a
2010 Jan 09
0
[Lattice] panel.levelplot - shrink argument to highlight absolute z-values
Hi -
I have a levelplot with positive and negative z-values. I'd like
to scale the levelplot rectangles proportional to the *absolute*
z-values to highlight the z-value extremes (while retaining the color
difference to track the positive/negative attribute). I've likely
missed something in the documentation, but have been at it a couple
days without finding a solution (other than
2008 Apr 23
4
filled contour plots
hello everyone,
I was wondering if anybody can help me solve 2
problems related to the function filled.contour.
I am entering the following R command:
filled.contour(xx,yy,P1, nlevels=20,color=cm.colors,
plot.axes={
contour(xx,yy,P1,add=T,col="grey",
nlevels=20, drawlabels=F)
axis(1,1:length(xx),labels=xlabels)
2003 Aug 29
1
levelplot behaviour when "at" cuts the z range
Consider the following examples:
library(lattice)
x = c(1,1,2,2)
y = c(1,2,1,2)
z = 1:4
levelplot(z~x+y,at=c(.5, 1.5, 2.5, 3.5, 4.5)) # correct
levelplot(z~x+y,at=c(.5, 1.5, 2.5)) # ?
The second plot is clearly incorrect. However, I don't know
what correct behaviour is: ignore everything above 2.5 and
issue a warning? Reject at values that do not cover the
data range, and issue an
2009 Apr 08
1
how to adjust titles on sub-plots in levelplot / contour plot?
Hello,
I have a (relatively long) function script that generates a levelplot.
I don't want to include all of the code, so I have attached in file
"miniDataSet.csv" an example for the data set "miniDataSet" that is called
below.
The function works OK, except that when the variables in the "splitCol"
column get very large (as they are in this data set I
2012 Mar 20
3
error message
Dear all,
Who will bail me out. Iam using R with S-Splancs. Anytime i typed in the syntex, an error will appear eg setwd("C:\\TEMP)
>dat <- read.table(cheshire_fmd.cvs",header=TRUE, sep=",")
> dat.<-read.table(''chesire_fmd.cvs'',header=TRUE,sep='',)
Error: unexpected symbol in "dat.<-read.table(''chesire_fmd.cvs"
>