Displaying 15 results from an estimated 15 matches for "spatialgrid".
2017 Jul 09
2
Histogram plots in Lattice with spatialgrid dataframe data
Hi all,
I can not seem to get what I want using the Lattice package to generate an
array of histograms of
spatialgrid dataframe data.
I can use the sp package and spplot to generate an array of maps that
display an array of spatialgrid dataframe data -- that's good. I have:
spplot(ann_bias,xlim=c(1423987.5,2614612.5),ylim=c(-5862637.5,-4624387.5),at=brks,col.regions=colp(length(brks)-1),main="NOAA/NWS
O...
2017 Jul 09
0
Histogram plots in Lattice with spatialgrid dataframe data
...12,yr_2013,yr_2014,yr_2015,yr_2016)
histogram(~ bias | year, data=bias)
Cheers!
Tom
On Sun, Jul 9, 2017 at 11:21 AM, Thomas Adams <tea3rd at gmail.com> wrote:
> Hi all,
>
> I can not seem to get what I want using the Lattice package to generate an
> array of histograms of
> spatialgrid dataframe data.
>
> I can use the sp package and spplot to generate an array of maps that
> display an array of spatialgrid dataframe data -- that's good. I have:
>
> spplot(ann_bias,xlim=c(1423987.5,2614612.5),ylim=c(-
> 5862637.5,-4624387.5),at=brks,col.regions=colp(length(b...
2017 Jul 10
1
Histogram plots in Lattice with spatialgrid dataframe data
...| year, data=bias)
>
>Cheers!
>Tom
>
>
>On Sun, Jul 9, 2017 at 11:21 AM, Thomas Adams <tea3rd at gmail.com> wrote:
>
>> Hi all,
>>
>> I can not seem to get what I want using the Lattice package to
>generate an
>> array of histograms of
>> spatialgrid dataframe data.
>>
>> I can use the sp package and spplot to generate an array of maps that
>> display an array of spatialgrid dataframe data -- that's good. I
>have:
>>
>> spplot(ann_bias,xlim=c(1423987.5,2614612.5),ylim=c(-
>>
>5862637.5,-4624387.5),a...
2011 Sep 14
1
S4 method dispatch
...(obj) {
cl1 = class(obj)
doNothing(obj) = TRUE
cl2 = class(obj)
if (!identical(cl1, cl2)) {
print(paste(cl1, cl2))
stopifnot(identical(cl1, cl2))
}
obj
}
When things go wrong, dosth and doNothing are called with a subclass of
Spatial, e.g. an object of class SpatialGrid, but when this gets in
doNothing, the object is suddenly of class Spatial, and is then returned
as an object of class Spatial, which should never happen.
For instance, I have a case where consistently
setMethod("fullgrid", c("Spatial"),
function(obj) { is(obj, "Spatia...
2011 Jan 05
1
Prediction error for Ordinary Kriging
...at_0=39.66666666666666
+lon_0=-8.131906111111112 +k=1 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs"))
bb <- bbox(rsa2)
cs <- c(1, 1)
cc <- bb[, 1] + (cs/2)
cd <- ceiling(diff(t(bb))/cs)
rsa2_grd <- GridTopology(cellcentre.offset = cc,cellsize = cs, cells.dim = cd)
getClass("SpatialGrid")
p4s <- CRS(proj4string(rsa2))
x2_SG <- SpatialGrid(rsa2_grd, proj4string = p4s)
x2_SP <- SpatialPoints(cbind(x2$X, x2$Y))
v <- variogram(log1p(tsport_ace) ~ 1, x2, cutoff=100, width=9)
te<- fit.variogram(v,vgm(0.0437, "Exp", 26, 0))
y <- krige(tsport_ace~1, x2, x2...
2006 Dec 07
2
making a grid of points
I'd like to evaluate a function at each point on a 2 or 3-D grid. Is
there some function that already does this, or generates the grid of
points?
My search has led me to the grid and lattice packages, and I found a
reference to the sp package (e.g., SpatialGrid) for this. There are
things in there that might be relevant, but at first blush many of them
are embedded in other concepts (grobs, shingles, rugs) and don't
obviously solve the problem.
I know this is not a hard thing to program, but I suspect someone has
already done it. Any pointers?
Tha...
2010 Nov 02
0
spatial plots maps-ssplot
...like shaded gridboxes, the
boxes should be filled with colour. Can anyone help me with this
problem? Thank you in advance!
This is part of my code:
minlon<-4.5
maxlon<-12
minlat<-46.5
maxlat<-52.5
gt=GridTopology(cellcentre.offset=c(5.75,47.5),cellsize=c(2.5,2),cells.dim=c(3,3))
grd=SpatialGrid(gt,proj4string = CRS(as.character(NA)))
gridparameters(grd)
gd<-as.data.frame(grd,"SpatialGrid")
h<-season_djf
h<-as.data.frame(h)
djf.att=SpatialPointsDataFrame(gd,h)
gridded(djf.att)=TRUE
spplot(djf.att, col.regions = colorRampPalette(c("red","orange",
&qu...
2005 Nov 17
8
Point pattern to grid
Dear all,
I'd like to change a point pattern to a grid of cells and use one of the variables as the output.
e.g. The point pattern is of a window of (500*500) and several features such as pH, SoilType etc. I like to divide it into a grid with cell size 5*5, and use the mean of the point values falling inside the cell as the output.
Is there any package in R working with this? Thanks in
2007 Apr 18
3
Matrix or grid conversion of spatial data
Dear Happy R-users & experts,
I am in need of advice,
While working with spatial data (x & y coordinates of seed locations) I have come accross the problem that I need to convert my point data into a matrix or grid system. I then need to count how often a point falls into a certain position in the matrix or grid. I have searched all day online, asked collegeas but nothing works.
Sadly
2007 Sep 02
1
how to sub-sample a variable on another file coordinates
Hello 'R' Users,
I have a monthly mean CO2 necdf data file defined on 1x1 lat by lon
coordinate. I want to sub-sample this variable CO2 on the coordinates
of another ASCII data file. The coordinates of another ASCII data file are
as:
-24.01 152.06 -18.58 150.19 -13.46 148.35 -8.29 147.03 -3.14 146.19 1.53
145.59 7.08 145.33 12.25 145.02 17.46 144.31 22.44 142.35 27.53 141.26 33.04
2008 Aug 07
0
3d kriging et al
...t(logTotalPAH)
lpah.vgm = variogram(logTotalPAH ~1, PAHdata)
lpah.vgm
plot(lpah.vgm )
lpah.fit = fit.variogram(lpah.vgm, model = vgm( 6, "Sph", 80, 1.5))
lpah.fit
plot(lpah.vgm, lpah.fit)
x = GridTopology(c(534500,3531400, 20), c(2,2, 0.5), c(176,126, 31))
class(x)
coordinatevalues(x)
x = SpatialGrid(x)
class(x)
grd = as(x, "SpatialPixels")
lpah.kriged = krige(logTotalPAH~1, PAHdata, x, model = lpah.fit)
class(lpah.kriged)
lpah.kriged = as(lpah.kriged, "SpatialPixelsDataFrame")
Any help would be appreciated.
...using R 2.7.0 on a windows XP desktop computer. ... will happ...
2007 Dec 12
1
How to plot the grid figure using R?
Now I have the forest plot data with x, y locations, and I measured the DBH for every indivicuals.
The data looks like that:
x=runif(100,0,100)
y=runif(100,0,100)
dbh=runif(100,1,100)
rdata=data.frame(x,y,dbh)
> rdata[1:5,]
x y dbh
1 99.5354145 1.412844 34.10112
2 0.8259361 87.737036 39.12914
3 6.5678613 65.699032 22.55990
4 67.2987881 72.053877 45.83978
5 2.2491372
2010 Oct 01
1
colored rasterImage()
Hello,
I have been exploring the possibility to transition some code that
currently uses image() to use the new rasterImage(). To date, I
haven't been able to specify a color look-up strategy that works. For
example...
nx <- 100
ny <- 100
m <- matrix(data = rep(seq(0,1, length = nx), ny), ncol = nx, nrow =
ny, byrow = TRUE)
plot(1:nx, 1:ny, type = "n")
my.color
2009 Jul 16
2
Problems generating image from tiff file
I imported the attached tiff file and converted the coordinate system to
long lat and graphed it:
californiatiff<- readGDAL("california1.tif")
proj4string(californiatiff)
> rasterprojection <- spTransform(californiatiff, CRS("+proj=longlat")
however, when using the plot command for rasterprojection, I get a blob. I
can see the outline of the state of california and
2012 Dec 17
2
looping through spatial points and getting counts of spatial points in spatial grid in R
...ll my spatial points are in one folder.
# Creating spatial points in R - reading the POI shapefiles as SpatialPointsDataFrame in R autopts.rg <- readOGR(".", "AutoSvc")class (autopts.rg)
# Getting a count of the Spatial Points in the Spatial Data Frame in.cell <- overlay(SpatialGrid_LS,FinInstq2) newdata <- data.frame(table(in.cell))View(newdata)
"SpatialGrid_LS" is the spatial grid that I had created in R.
I guess a For loop would help, but although I tried several things, I haven't been successful yet.
Thanks!
Tilo
[[alternative HTML version deleted]]