I'm trying to plot the spatial distribution of the precipitation within an area. However, I think some thing wrong with the way to create the matrix for the precipitation data, so it came out lots of stripes. Could somebody help to see what's the problem?
Here's the code:
library(maptools);gpclibPermit()
KSR <- readShapeLines("/Users/R/Code/data/KS_River_Basin_Dissolve.shp")
states <- readShapeLines("/Users/R/Code/data/statesp020.shp")
ppt <- read.table ('/Users/R/Code/LULC/pptnewlulc.dat', header = FALSE) # the size is 5764(pixels) x 528(periods)
ppt <- (ppt/100)*25.4 #convert from hundredths of an inch to mm
# the range of the area
plat <- as.matrix(seq(38.16836,41.29575,by=0.07273)) #dimension is (44,1)
plon <- as.matrix(seq(-103.9752,-94.5,by=0.07273)) #dimension is (131,1)
ppt1 <- ppt[,1] #length is 5764
ppt1 <- matrix(as.numeric(ppt[,1]), nrow=131, ncol=44)