Description Usage Arguments Value Examples
mapgrid is used when plotting up the distribution of different variables from a SpatialPolygonsDataFrame that has been translated into an ordinary data.frame. It uses the lat and long to place the given variable onto a plottas graphic. The variables available are blkg2012 - blkg2018, blkgtotal, days2012 -days2018, daystotal, mins2012 - mins2018, minstotal, divers2012-divers2018, kgday2012 - kgday2018. The values for each variable are all scaled relative to the maximum but can be multiplied by mult. Points will only be plotted where there is a value. An NA will result in a missing point. If only the location of an active grid is wanted then set loconly = TRUE, otherwise the relative value in x will be used to set the size of the point up to a maximum size of mult.
1 2 |
view |
the length 4 vector with c(left,right,up, down) that acts as a window over Tasmania; if view = NA then the data from the input data.frame are plotted rather than using view to select the data. |
dat |
the data.frame from which to select the 1 hectare grids within the given view |
x |
the name of the variable selected; default = "days2012" |
mult |
the multiplier on the size of the point plotted; default = 2 |
col |
the colour of each point; default = 2 (red) |
loconly |
a logical value determining whether to plot only the location or a proxy for the relative value of the chosen x; the default = FALSE so mapgrid will plot the relative value |
infill |
the background colour filling open symbols like pch=1; defaults to incol |
inpch |
default = 21, but can be changed to any valid symbol |
invisibly returns the records selected by getpoints
1 2 3 4 5 | ## Not run:
# ab <- readRDS(paste0(datadir,"G1Ha_2018_10_23.rds"))#get spatial obj
# abdat <- getlatlong(ab) # convert to data.frame + lat long
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.