similar to: mapping lat and long with maps package

Displaying 20 results from an estimated 8000 matches similar to: "mapping lat and long with maps package"

2009 Feb 19
2
colored maps again
I'm trying to create a colored map that would show the number of students per state. My data frame consists of two columns - state and count. I'm using the following code library(maps) map("usa") library(plotrix) state.col<-color.scale(gre$count,0,0,c(0,1)) map("state",fill=TRUE,col=state.col) I'm getting a map, but the values are not being mapped to correct
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 axis ranges on each
2006 Feb 09
1
converting lat-long coordinates to Albers Conical Equal Area coordinates
#################################################################################### We have used maptools to construct state, county, township, census-tract, and zipcode level R maps with an Albers Conical Equal Area projection. We would like to be able to plot the location of weather stations or other point locations on the maps. The data the point locations are in latitude-longitude units
2008 Nov 17
2
looking for matches
My question is probably pretty basic, but since I'm really new to R, here it goes .... I have two separate data frames that include class names and various other information on classes. I'm trying to create a match based on class names and if a match exists to create a third data frame with the class name. I was hoping to accomplish this with sapply, but I can't figure out if I can
2011 Jun 20
3
importing a file
I haven't used R in a couple of years, and now am trying something as simple as importing a csv file and am running into problems right away. * mydata <- read.csv (Wordata1.csv, sep="") Error in read.table(file = file, header = header, sep = sep, quote = quote, : object 'Wordata1.csv' not found *I've tried in both as as read.csv and read.table and still get the
2009 Feb 17
2
creating a map
I'm trying to create a fairly basic map using R. What i want to get is the map of the country with circles representing a count of students in each state. What I've done so far is as following - map("state") symbols(data1$count,circles=log(data1$count)*3,fg=col,bg=col,add=T,inches=F) this gives me the map of the country, but one that's not populated by my counts. Does
2009 Jan 21
2
Replacing dates with consecutive observations
I am working with a list of dates and I would like to replace each date with the one that comes after, ie. 1/1/07 will become 1/5/07, 1/5/07 will become 1/7/07, etc. The number of days between my dates always varies, so I can't just increase each one by 5 days or so. Does anyone know of a way I can do this in R? thank you [[alternative HTML version deleted]]
2006 Mar 21
3
transform shapefiles in UTM to lat/long
Dear all: I have a shapefile in UTM coordinate system and I would like to transform it to Lat/Log coordinates (WSG84). The package PBSmapping contains function convUL to transform between the two coordinate systems when data is in the form of a data frame with attributes specifying the coordinate system. However, when shapefiles are imported using function read.shape (package maptools), a list
2011 Jun 21
5
converting character to numeric
I'm trying to convert data from character to numeric. I've imported data as a csv file, I'm assuming that the import is a database - are all the columns in a database considered "vectors" and that they can be operated on individually Therefore I've tried the following mydata <- as.numeric(mydata$apples) when i then look at mydata again the named column is still
2005 Mar 09
3
from long/lat to UTM
Hi: Is there any function in R which can convert the long/lat to UTM(Universal Transverse Mercator)? There are quite a few converters on Internet. However, the interface is designed as input->output which I can not convert lots of locations at the same time. Another question is whether there is a function in R which can tell the time zone from the location's lat/long? Thank you!
2013 Feb 13
1
[lattice] display a projected map on a layerplot
summary: I can display a lon-lat map on a lattice::layerplot, and I can display a Lambert conformal conic (LCC) map on a spam::image, but I can't display an LCC map on a lattice::layerplot. Example follows. What am I doing wrong? details: I've been using `lattice` (via `rasterVis`) successfully to display global atmospheric data, which works well enough (though I am definitely intrigued
2008 Oct 07
2
masking a regular lat/lon grid to extract map boundaries
Dear R-helpers, I have lat/lon coordinates of regularly spaced grid points, about 4Km apart, covering the entire US continental region. I would like to mask this rectangular grid in order to extract all and only the grid points within a specific region. Today I want to extract Montana, say, from this grid, and I am hoping to somehow use the returned value of the function
2008 Nov 09
1
maptools sunrise sunset function
##This is a function that I am trying to write to calculate sunrise and sunset and works "mostly", but returns nonsensical values. What am I #missing? Thanks in advance. ###remember to include maptools as dependence### library(maptools) sunrise.set <- function(lat, long, date, timezone="UTC", num.days=1){ #this needs to be long lat# lat.long <- matrix(c(long, lat),
2004 Aug 22
1
latitude longitude data
Dear R-helpers, I get GPS readings with bug counts (bugs meaning insects in this case) made along rows in crop fields and use these to make maps of bug distribution. The GPS readings are not quite accurate enough for my purpose, so since I know what row each reading is made in, I adjust the latitudinal coordinate using: grd<-lm(lat~lon+Row,data)
2005 Jun 09
1
Plot/manage spatial boundary data
I have some disconnected boundary data from a finite element ocean model and I'd like to make a plot. Maptools looks promising, but since my data is not in a shapefile or a map, I'm unclear on what the best way to approach the problem. >geom[1:10,] lon lat depth 1 -75.42481 35.58192 16.172 2 -75.40726 35.58567 18.045 3 -75.41351 35.60312 17.333 4 -75.38888 35.58959
2012 Apr 05
1
Inputing Excel data into R to make a map
Hi everyone, I'm trying to input an excel datasheet with city names and lat+longs, that has already been converted to a .csv file and make a map using R with my data. My datasheet is 30 cities, with their lat+long, temp, elevation. So far all I'm able to do is load the datasheet into R, I installed the map+ maptools packages so I can see a map of the US in R, but I don't know how I
2010 Jun 23
1
Plotting Data on a Map
Hi: I am practicing with the attached shapefile and was wondering if I can get some help. Haven't used 'rgdal' and 'maptools' much but it appears to be a great way bring map data into R. Please take a look at the comments and let me know if I need to explain better what I am trying to accomplish. library(rgdal) library(maptools) library(ggplot2) dsn="C:/Documents and
2011 Jul 28
3
smooth scatterplot and geo map
Hello everybody, I'm trying to understand how to draw a smoothed scatterplot on a geographic map with R. Have a dataframe with point locations (long, lat) and was able to simply plot these points on a shp map by using the maptools package. However, instead of having simply the raw points on the map, I would like to have a "smoothed" scatterplot of the same superimposed on the map.
2009 Jun 03
2
Arc/Info Ungenerate - shp - Maps
Hi list. I would like to know if someone had already successfully loaded and Arc/Info Ungenerated (.dat – extracted from http://rimmer.ngdc.noaa.gov/mgg/coast/getcoast.html) file on R. I’m able to do so with shape files using maptools functions, but these ungenerated data are making me crazy. I don’t have any of ArcGIS tools (one of them probably can do that), and I can’t find any free tool that
2009 Mar 31
1
target of assignment expands to non-language object
I'm running the following code numbers <- 1:50 for (i in 1:50) assign(paste("model",numbers[i]),i)<-(lm(temp$Overall.Scaled.Score~temp$raw.score)) where I want R to create 50 different models-1:50, but get the following error message "target of assignment expands to non-language object". I've tried it with