Hi All,
Does anybody know of any existing functions that will calculate distance
inland from a coastline?
It's possible to test if a lon,lat location is land or sea using
map.where(), but I need to add a buffer to this of say 2km, to allow for
points that are just on the coast, and below the res
Many thanks, I think that should help. I'll give it a go.
--
View this message in context:
http://r.789695.n4.nabble.com/Testing-if-a-variable-is-specified-within-a-function-adding-TRUE-FALSE-options-to-functions-tp3633248p3635979.html
Sent from the R help mailing list archive at Nabble.com.
___
I have 2 related questions about functions.
1. I am writing a function to plot data from a time series with the form
myplot<-function(data, d1,d2) {}
Where d1 and d2 are two dates in a time series. The idea being that if no
values for d1 and d2 are entered then the function defaults to plott
Using layout I've created a function that makes a 2 panel plot - comprising a
main plot, and a sub-panel with custom legend.
I would now like to use layout to create multiple panels with plots created
by my function, however the values for layout set in the function act
globally, stopping me from
Those are all really helpful responses. Got it sorted now. Many thanks
indeed!
--
View this message in context:
http://r.789695.n4.nabble.com/Extract-time-only-from-POSIXlt-object-tp3246751p3247105.html
Sent from the R help mailing list archive at Nabble.com.
__
How can I extract only the time component from an POSIXlt object?
For example if I try the following it still returns both the date and
time...
>as.POSIXlt(tr.date[1])
[1] "2010-10-18 21:46:53"
>as.POSIXlt(tr.date[1],"%H:%M:%S")
[1] "2010-10-18 21:46:53"
round and trunc don't help... is there
Thanks so much for that elegant solution... it works extremely well.
I'm now trying to add lines, points and polygons to show transects,
locations of the original data points and the bounding polygon of the study
area. Presumably I can use panel.polygonsplot, panel.pointsplot for this?
--
Vie
Thanks for those pointers making some progress now
The following will put the levelplot on to the map, but the not with the
co-ordinates aligned...
The level plot appears on a slightly larger scale compared to the underlying
map.
In both the map and levelplot, the coordinates are in lon, lat
Thanks for the suggestions Unfortunately contour won't in this case as it
expects the x,y values to be in an ascending sequence.
--
View this message in context:
http://r.789695.n4.nabble.com/overlaying-a-levelplot-on-a-map-plot-tp2019419p2020292.html
Sent from the R help mailing list ar
I've generated a levelplot showing the density distribution of a species
derived from survey transects, with lon, lat co-ordinates.
I'd like to overlay this on a map of the study region specified by:
map('worldHires', xlim = range(mlon), ylim = range(mlat)), where mlon, mlat
specifies the study
Could somebody give me a pointer on how to generate a SpatialLinesDataFrame
from a dataframe, that contains lat,long coordinates as separate variables.
At the moment the data looks like this:
lat long
[1] 53. 1.
where as the SpatialLinesDataFrame consists of
Coordina
11 matches
Mail list logo