search for: gpw_pop_density_hd_1995a

Displaying 1 result from an estimated 1 matches for "gpw_pop_density_hd_1995a".

2008 Jul 15
3
Melt (reshape) question
...39;ve done, and maybe you someone spot a fundamental error of mine, or something that I'm missing. columnnames <- sprintf("%.2f", seq(from = -179.75, to = 179.75, length = 720)) rnames <- sprintf("%.2f", seq(from = 89.75, to = -89.75, length = 360)) read.table("gpw_pop_density_hd_1995a.asc", colClasses = "numeric", na = "-99") -> PopDens colnames <- columnnames rownames <- rnames library(reshape) PopDens$Latitude <- rownames PopDens.long <- melt(PopDens, id.var = "Latitude", na.rm = TRUE) names(PopDens.long) <- c("Lat...