[R] Raster Help

Sven E. Templer sven.templer at gmail.com
Thu Feb 19 21:37:24 CET 2015


Without (example) code it is hard to follow... use ?dput to present
some data (subset).
But if it is data.frames you are dealing with (for sure with read.csv,
but not so sure at all with raster maps), give this a try:

?merge

On 19 February 2015 at 17:44, Simon Tarr <simon.tarr at adtrak.co.uk> wrote:
> Hello everyone,
>
> I need a little help with some R syntax to complete what (I think) is a
> fairly straightforward task- hopefully someone can assist!
>
> I have a raster map of the UK which is split into postcode areas (e.g. DE,
> NG, NR etc. 127 postcodes in total).
>
> I have installed the package 'raster' and have successfully plotted the
> .img in R. All working and looks correct with the raster.
>
> I also have a comma delimited CSV file containing the same postcodes as the
> raster with another column next to it containing revenue for each postcode.
>
> *I was wondering if someone could help me merge/bind the revenue figures
> into the correct postcode in the raster so that I can plot revenue per
> postcode.*
>
> I feel I should be using cbind and reclassify to do this but I can't be
> sure.
>
> Any help would be appreciated. Thanks in advance!
>
> Simon
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list