Heatmap
Hi Carlos,
The error from:
readShapePoly("depto.shp")
may well be that the function cannot find the file. Assuming that
there is a file "depto.shp", is it in the working directory of R when
you issue this command? Find out by:
getwd()
I suppose that macintosh computers try to hide the actual location of
files, so you may have to hunt around to find where the file resides
and whether you will have to add a path to your call. The second error
probably stems from the first, as if the file hasn't been read, the
information in it cannot be extracted.
Jim
On Sat, May 23, 2015 at 7:07 AM, David Winsemius <dwinsemius at comcast.net> wrote:
On May 22, 2015, at 10:32 AM, Carlos Javier Rincon Rodriguez wrote:
Hi. Good morning.
I am trying to load a shapefile to do a heatmap of Colombia. I using all
this package:
library(ctv)
library(spatial)
library(ggplot2)
library(sp)
library(rgdal)
library(rgeos)
library(maptools)
library(ggmap)
and a using this two commands to load the file:
depto<-readShapePoly("depto.shp")
Was going to suggest following up on the SIG-geo mailing list since the shape-shifters don't all hang out in these parts, but I see that you crossposted. (That's not considered good form on R mailing lists.)
depto <- readOGR(dsn = ".", "depto")
but the result is:
depto<-readShapePoly("depto.shp")
Error in getinfo.shape(filen) : Error opening SHP file
depto <- readOGR(dsn = ".", "depto")
Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding,
use_iconv = use_iconv, : Cannot open file
Also I am working in a MAC computer and when I open R, I have this warning
message:
WARNING: You're using a non-UTF8 locale, therefore only ASCII
characters will work.
Please read R for Mac OS X FAQ (see Help) section 9 and adjust your
system preferences accordingly.
I looking the R for Mac document but there is not section 9.!!!
This FAQ: http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html (I see 10 numbered major headings, although admittedly the 9th is the acknowledgements section. I'm wondering if it were the 7th section that was meant, since it has information about setting the locale.) -- David.
Thanks for any help. Carlos. 2015-05-05 18:01 GMT-05:00 Carlos Javier Rincon Rodriguez < cjrinconr at unal.edu.co>:
Hi.
This is my problem. I try to load a shapefile to do a heatmap of Colombia.
I using all this package:
library(ctv)
library(spatial)
library(ggplot2)
library(sp)
library(rgdal)
library(rgeos)
library(maptools)
library(ggmap)
and a using this two commands to load the file:
depto<-readShapePoly("depto.shp")
depto <- readOGR(dsn = ".", "depto")
but the result is:
depto<-readShapePoly("depto.shp")
Error in getinfo.shape(filen) : Error opening SHP file
depto <- readOGR(dsn = ".", "depto")
Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv
= use_iconv, :
Cannot open file
I attach the shapefile that i using.
also i am working in mac computer i don know if that could be the reason.
if somebody knows thanks.
2015-04-28 4:18 GMT-05:00 John Sorkin <jsorkin at grecc.umaryland.edu>:
Look at the heatmap function
John David Sorkin M.D., Ph.D. Professor of Medicine Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology and
Geriatric Medicine
Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-7119 (Fax) 410-605-7913 (Please call phone number above prior to faxing)
On Apr 28, 2015, at 3:41 AM, John Wasige <johnwasige at gmail.com> wrote: Dear all, I need to make a heapmap of SPI results for a monthly timeseies of 30 years. Does anybody know to do it? Thanks for your help John [[alternative HTML version deleted]]
______________________________________________
David Winsemius Alameda, CA, USA
______________________________________________ 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.