Minti,
At this point, given your previous messages, it is rather unclear whether
you actually need spTransform. Why are you using it? It does not help in
creating a raster (which you say your purpose is).
Robert


On Sun, Oct 7, 2012 at 3:58 PM, alemante zd <mintibezabih@gmail.com> wrote:

> Dear all,
>
> This might be a very elementary question to most on here but I am
> trying to construct a raster from my latitude/longtude data and while
> I managed to get most codes right (with help from you guys), I could
> not figure out what to put in place of "fill in the proj4 string you
> want". Where do I get these figures from? I tried looking up the
> location of Ethiopia where data for this exercise is from and came up
> with this figure("+init=epsg:4326"). But when I insterted it , I was
> not successful in fully running my code
>
> Anyway, my full codes looks like below:
>
>
> x <- 1:10
>
> y <- 1:10
>
> F1<-data.frame(x, y)
>
> library(sp)
>
> SP <- SpatialPoints(F1,proj4string=CRS("+proj=longlat"))
>
>
> library(rgdal)
>
> spt <- spTransform(SP, CRS("  fill in  the proj4 string you want  ") )
>
>
> gridded(spt) = TRUE
>
> library(raster)
> r = raster(spt)
> projection(r) = CRS("fill in  the proj4 string you want  ")
> plot(r)
>
> I would be most grateful for any help as usual.
>
> Cheers
> minti
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]

