search for: polylist

Displaying 17 results from an estimated 17 matches for "polylist".

2008 Jul 08
2
attributing values to dataframe positions following eval
Hi everybody, I've been looking around, but can't seem to find the answer. I get a list of names (which vary, so I never know them in advance), and transform them into variables, each of which is a dataframe, using assign: polyList <- c("rs123", "rs124", "rs555", "rs000") numPoly <- length(polyList) for (k in 1:numPoly) { assign(polyList[k], data.frame(matrix(NA, ncol=3, nrow=3))) } polyList <- lapply(polyList, as.name) I can see the resulting dataframe associa...
2008 Jun 29
2
How to get an argument dynamically from a list?
...3/12') JOHN <- c('A/A', 'C/A', '154/35') CLIFF <- c('A/C', 'C/C', '15/12') PAM <- c('A/C', 'C/A', '13/12') sampleList <- c("BOB", "MARY", "JOHN", "CLIFF", "PAM") polyList <- c("rs123", "rs124", "rs555") #make dataframe with data data.raw <- data.frame(t(do.call(data.frame, lapply(sampleList, get)))) names(data.raw) <- polyList row.names(data.raw) <- sampleList I want to get, for example, data.raw$rs124 using polyList. I...
2008 Jun 29
1
creating a dataframe using a list of the variable names
.../12') JOHN <- c('A/A', 'C/A', '154/35') CLIFF <- c('A/C', 'C/C', '15/12') PAM <- c('A/C', 'C/A', '13/12') sampleList <- c("BOB", "MARY", "JOHN", "CLIFF", "PAM") polyList <- c("rs123", "rs124", "rs555") to create a dataframe with the data I use: data.raw <- data.frame(BOB, MARY, JOHN, CLIFF, PAM, row.names=polyList) which works fine, but when there are several hundreds samples... well, you guess my problem. I'd like to cre...
2006 Jan 07
1
maptools, write.polylistShape
Dear Roger, I am trying to use the write.polylistShape() function of maptools for the first time and realize that it handles list of polygons of class 'polylist'. However, it seems that no as.polylist() function exist in the package. The question behind that is: in your opinion, which would be the best way to convert a list of matrix...
2006 Dec 30
1
plot methods in sp
...?plot.SpatialPolygonsDataFrame, nor ?plot.SpatialPolygons, etc.. provide a help, though the lattice function spplot is adequately documented. On the other hand, plot(myobject, border="grey"), with myobject a SpatialPolygonsDataframe is well interpreted and recalls the syntax of plot.polylist of matools (though myobject is far from being a polylist...). Can anybody (especially the package's authors...) comment on this? Where a help with the list of the plot function arguments can be found? Thanks for any hint, Patrick
2006 Oct 07
3
merge and polylist
...t.data, nc$att.data$NAME!="Honolulu, HI") nc$att.data[,1]=as.numeric(paste(nc$att.data$MSACMSA)) #attributes(nc$att.data) nc$att.data=merge(nc$att.data, dat, by.x="AREA", by.y="cod", all.x=TRUE, sort=FALSE) #attributes(nc$att.data) tmp=file("tmp") write.polylistShape(submap, nc$att.data, "tmp") #_________________________________________________________ All works fine, but merge() changes the rownames and the link between the polygons and the corresponding rows is lost. I tried numerous other solutions (such as to "paste" back the old...
2004 Nov 22
1
plot.Map Maptools
Hi, Is there any way to plot a Map with different shading patterns, instead of color intensity, in R2.0.1 over Linux ? Thanks. D ----------------------------------------- Stay ahead of the information curve. Receive GIS news and jobs on your desktop daily. Subscribe today to the GIS CafeNews newsletter. [ http://www10.giscafe.com/nl/newsletter_subscribe.php ] It's informative and
2009 Feb 08
0
recursive derivative a list of polynomials
...tep is to evaluate all of these polynomials with a vector argument and return a list of data.frames. I've come up with the following hack but it's really ugly, > require(orthopolynom) > > md <- function(.p, m=2){ > test <- list() > if(.p==0) pl.list <- rep(as.polylist(.p), m+1) else { > pl.list <- as.polylist(.p) > for(n in seq(1, m+1)){ > pl.list[[n+1]] <- deriv(pl.list[[n]]) > } > } > rev(pl.list) # ascending order > } > > l <- 3 # example > theta <- seq(0, pi, length= 10) # the variable to evaluate the...
2004 Sep 22
2
dot density maps
Dear All, In the moment i'm using the map and maptools package to read shapefiles and display the maps. I'm looking for the possibility to draw points (randomly positioned or positioned according to a grid) into the polygons instead of filling the polygons with colors. For example: a map (shapefile) with 10 countries, 15 points in the polygon of country A, 20 points in the
2003 Dec 01
1
Re: using shapefile as owin
My sincerest apologies, as this is a very elementary problem, but I have searched through archives and FAQs and on the web, and I am at the end of my own resources. I need to do analysis of a spatial point process occuring with four counties, using spatstat. I've had no trouble importing the shapefiles, but I can't seem to figure out what I need to do in order to use the boundary as an
2004 Apr 05
1
Drawing maps in R?
What tools and documentation exist for producing maps and working with polygon and polylist objects in R beyond the following: * Packages maps, mapproj, maptools, and mapdata. * Becker and Wilks (1993, 1995), listed as references in the documentation on the "map" function. Thanks, Spencer Graves
2005 Jun 09
1
Plot/manage spatial boundary data
...,col="blue") lines(geom$lon[island1],geom$lat[island1],pch='.',t='l',col="green") The above is toy-sized: dim(geom) is on the order of 120000,3 and there are about 30 different islands. Maptools seems devoted to shapefiles, and it is unclear how to create 'polylists'. Is there a good way to manage and graph data defined on irregular grids? Dave -- Dr. David Forrest drf at vims.edu (804)684-7900w drf5n at maplepark.com (804)642-0662h http://maplepark.com...
2005 Feb 09
1
FW: Drawing maps of UK
...d.shape("euadmll.shp") mappolys <- Map2poly(try) # this produces 14 warnings() of the type: # 1: level 2 circularity at 62 in: .mtlbuild(.mtafters(r1), rD) # etc # 14: From next release, default hole handling will change in: Map2poly(try) plot(mappolys) Gives an error: Error in plot.polylist(mappolys) : malformed plot order I also get this with Map2ploy(..., raw=FALSE) I have no idea what this means! :-( Mick
2010 Mar 15
1
map2poly - map lat/long cannot be unconstrained?
Using the maptools function "map2poly" I have created a map/polylist object - a map of the Great Lakes. My goal is to passively plot additional data on this map. Unfortunately I am not able to change (distort) the relative scale of the axes for the map, and so the sample points do not line up correctly on the map. In the code below, notice that I have set the same...
2007 Sep 17
1
map issues
...ed packages and libraries: you could try 'help.search("plot.Spatial")' I went back and read the help on plot.Map and it says "This function is deprecated. It is difficult to maintain and there are several alternatives, either by converting Map objects to sp class objects or polylist etc. objects" and so i gather we can either try to move things into sp class. A little search of this archive tells me that there is a function out there called map2SpatialPolygons that is of some help. So after reading the help on this i tried to convert the Map object to an sp object. But I...
2006 Nov 30
2
*** caught segfault *** error
...000165, cause 'memory not mapped' Traceback: 1: polygon(coords[pFrom[i]:pTo[i], ], border = border, xpd = xpd, density = density, angle = angle) 2: polygonholes(x[[j]], border = border, xpd = xpd, density = density [j], angle = angle[j], pbg = pbg, forcefill = forcefill) 3: plot.polylist(district.pl) 4: plot(district.pl) 5: plot(district.pl) Possible actions: 1: abort (with core dump) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace Selection: I also get the same error when I use library shapefiles to import the shp file and then try to plot the p...
2003 Jun 30
4
french map
Hello, I would like to know if (as the usa map with Splus), it is possible with R to plot the french map and to add points (representing towns for instance) on the figure in the appropriate (x,y) system. Thank you. Nathalie Peyrard