[R] Help with R

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Sat Nov 19 20:39:42 CET 2016

This question is a bit too vague for the R mailing lists.

For general advice on using this list,  read the Posting Guide linked in the footer of this and every post on this list. One key recommendation made there is to send plain text emails because html frequently corrupts your example code so we cannot run it. 

For suggestions about making clear examples... read [1] and/or [2]. This is critical.

For starting points on analyzing spatial data, look at [3]. Keep in mind that for many types of spatial analysis a bitmap image won't be enough, so you need to find vector representations of maps. Also note that there is a dedicated mailing list called R-sig-geo for discussing this kind of analysis.

[1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

[2] http://adv-r.had.co.nz/Reproducibility.html

[3] https://cran.r-project.org/web/views/Spatial.html

Sent from my phone. Please excuse my brevity.

On November 19, 2016 10:32:46 AM PST, Jackson Hooten <jlhooten at eckerd.edu> wrote:
>Hello R Help,
>I am fairly new to R and have been scouring the internet trying to find
>useful tips, tricks and advice with how to solve my problems with R. I
>finally was able to find you guys, and am now asking for your help. I
>a number of different questions regarding R. My most pressing question
>how does one get a map of a very specific area into R? I've been
>a tutorial that one of my teachers sent me and been following his code.
>However, every time I input this code I get a warning message:
>My teacher's code:
>> plot(map, col="dimgray", border=F, add=T)
>The Error code I get every time I input the above code:
>> Error in plot.window(...) : need finite 'ylim' values
>In addition: Warning messages:
>1: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
>2: In min(x) : no non-missing arguments to min; returning Inf
>3: In max(x) : no non-missing arguments to max; returning -Inf
>4: In plot.window(...) : "border" is not a graphical parameter
>5: In plot.window(...) : "add" is not a graphical parameter
>So, what I think I figured out was that I didn't possess the "map" that
>teacher had in his R program. So I went to try and figure out how to
>get my
>own map into my R session. I found this line of code to try and input a
>good Google Earth map I found that I need for my study. But, alas, this
>code didn't work either and I got more Error codes.
>The code I used:
>> img <-readPNG(system.file("img", "Seal_Island_Map.png",
>The Error code I get every time I input the above code:
>> Error in readPNG(system.file("img", "Seal_Island_Map.png",
>package="png")) : unable to open
>For the life of me, I have not been able to find anything anywhere that
>help me solve these problems. What am I doing wrong? Can you all help?
>Thank you and I hope to talk to you all soon.
>	[[alternative HTML version deleted]]
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list