similar to: How to extend a slot of a class?

Displaying 20 results from an estimated 800 matches similar to: "How to extend a slot of a class?"

2011 Jan 06
1
Cross validation for Ordinary Kriging
ear ALL, The last part of my thesis analysis is the cross validation. Right now I am having difficulty using the cross validation of gstat. Below are my commands with the tsport_ace as the variable: nfold <- 3 part <- sample(1:nfold, 69, replace = TRUE) sel <- (part != 1) m.model <- x2[sel, ] m.valid <- x2[-sel, ] t<- fit.variogram(v,vgm(0.0437, "Exp", 26, 0)) cv69
2010 Jul 20
2
data from SpatialGridDataFrame
Dear All, I have a raster map of the class 'SpatialPointsDataFrame' and coordinates of the class 'SpatialPoints'. I would like to retrieve the values that are contained in the raster map at the specific locations given by the coordinates. Can anyone help me out? Kind regards, Katrin Fleischer
2012 Apr 07
1
rgeos - gBuffer, width by z-value
Dear list! I have problem with buffer size (width) in package rgeos. I would like to expand given geometry (points) to specified width based on the z value from attribute table. Here is example: point <- data.frame(x=c(10,20), y=c(10, 10), z = c(2,7)) point_shp <- SpatialPointsDataFrame(point[,1:2],point) plot(point_shp, xlim = c(0,30), ylim = c(0,20)) plot(gBuffer(point_shp, width = 5,
2010 Oct 19
1
Problems with a specific calculate.
Hello friends of R, My name is Toni, i'm 25 and I'm working on the Meteorological Investigation team from Balearic Islands. I had contact to you because I have a problem: I done a file for every day since 1912 about precipitation. That file has the following structure: > str(Ast) Loading required package: sp Formal class 'SpatialPixelsDataFrame' [package "sp"]
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)
2012 Dec 17
2
looping through spatial points and getting counts of spatial points in spatial grid in R
Hi, I am stuck in a looping problem. It might be an easy problem for experienced R users but I have been unable to do it. Any kind of help or advice will be great appreciated. I am creating a spatial grid and have a list of spatial points in a folder. I can read the spatial points separately and get a count of the points in the spatial grid in R. The output should be a table showing the counts of
2010 Sep 24
1
Saving iterative components
Hi, I need help! I am trying to iterate an iterative process to do cross vadation and store the results each time. I have a Spatial data.frame, called Tmese > str(Tmese) Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots ..@ data :'data.frame': 14 obs. of 17 variables: .. ..$ ID : int [1:14] 73 68 49 62 51 79 69 77 57 53 ... .. ..$
2009 Dec 10
2
plotting with varying dot sizes
Dear all, I am trying to plot on a spatial map the punctual measurements of the data located in the file (https://opengeo.metu.edu.tr/test.csv). I'd like to have the dots in some way proportional to the magnitudes of the measurements. I have difficulties with the code given below: The dot sizes do not vary not proportionally when varying the coefficient ("0.725"). It either plots
2023 Jan 26
1
akima interp results to zero with less than 10 values
Dear all I have this table > dput(mat) mat <- structure(c(2, 16, 9, 2, 16, 1, 1, 4, 7, 7, 44.52, 42.8, 43.54, 40.26, 40.09), dim = c(5L, 3L)) And I want to calculate result for contour or image plots as I did few years ago. However interp does not compute the z values and gives me zeros in z matrix. library(akima) > interp(mat[,1], mat[,2], mat[, 3], nx=5, ny=5) $x [1] 2.0 5.5
2023 Jan 26
1
akima interp results to zero with less than 10 values
The akima package has a problematic license (it doesn't allow commercial use), so it's been recommended that people use the interp package instead. When I use interp::interp instead of akima::interp, I get reasonable output from your example. So that's another reason to drop akima... Duncan Murdoch On 26/01/2023 9:35 a.m., PIKAL Petr wrote: > Dear all > > I have this
2011 Aug 24
1
setMethods/setGeneric problem when R CMD CHECK'ing a package
R-helpers: I'm trying to build a package, but I'm a bit new to the whole S3/S4 methods concept. I'm trying to add a new definition of the zoo function "as.yearmon", but I'm getting the following error when it gets to this point during a package install: *** R CMD INSTALL STARStools * installing to library
2011 Feb 11
1
Extract a slot value from a 'SpatialPolygons' class object
Dear R-users, I’m currently trying to extract the value of a slot (area) but can’t find out how to do that. >str(overlperc) List of 1 $ :Formal class 'SpatialPolygons' [package "sp"] with 4 slots .. ..@ polygons :List of 1 .. .. ..$ :Formal class 'Polygons' [package "sp"] with 5 slots .. .. .. .. ..@ Polygons :List of 1 .. .. .. .. .. ..$
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;
2011 Feb 07
2
Confused
Hi Im confused by one thing, and if someone can explain it I would be a happy > rev(strsplit("hej",NULL)) [[1]] [1] "h" "e" "j" > lapply(strsplit("hej",NULL),rev) [[1]] [1] "j" "e" "h" Why dossent the first one work? What is it in R that "fails" so to say that you need to use lapply for it to get
2010 Nov 02
0
spatial plots maps-ssplot
Hi all, I have made a plot with ssplot, using a SpatialPointsDataFrame. The content is quite simple, as I have 9 grid points with lon/lat coordinates and 9 values attached to these coordinates. They are in a square area of 3 by 3 gridboxes. I would like to lay a map from maps() over these values, but when I try this, the grids of the maps (smaller) do not overlap with the grids I have
2010 Oct 12
2
Memory limit problem
Dear List, I am trying to?plot?bathymetry contours around the Hawaiian Islands using the package rgdal and PBSmapping.? I have run into a memory limit when trying to combine two fairly small objects using cbind().? I have increased the memory to 4GB, but am being told I can't allocate a vector of size 240 Kb.? I am running R 2.11.1 on a Dell Optiplex 760 with Windows XP.? I have pasted
2011 Nov 04
2
How to write a shapefile with projection
Hi, ? I am trying to write a shapefile with projection. I have my data in a data.frame called try and consists in xy coordinates and a numerical attribute value z1. ? Libraries loaded are: sp, rgdal, raster, maptools ? head(try) ???????? x?????? ??? y??? ? ? ? ? ? ? ??? z1 1 610237.1 ???????? 3375751 ???????????? 8.221 2 610236.1 ???????? 3375750 ???????????? 8.153 3 610236.1 ????????
2008 Aug 05
4
LIDAR Problem in R (THANKS for HELP)
Hi All, I am a PhD student in forestry science and I am working with LiDAR data set (huge data set). I am a brand-new in R and geostatistic (SORRY, my background it?s in forestry) but I wish improve my skill for improve myself. I wish to develop a methodology to processing a large data-set of points (typical in LiDAR) but there is a problem with memory. I had created a subsample data-base but
2004 Dec 08
0
send file problem
Hi I have problem with this function: def download begin File.readable?(path) -> true File.file?(path) -> true path = "/path/hej.pdf" send_file path end Log gives me Processing ContentsController#download (for 192.168.0.6 at Tue Dec 07 23:05:17 CET 2004) Parameters: {"action"=>"download",