Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>So, your data set has some nice column names, like "decimal_long" and "decimal_lat". When you have those, you want to use those as column names, not the default names like "V37" and "V39".</p> <p>To get those default names, I'm guessing you read your data in without a header, when in fact it has one:</p> <pre><code>plotdata &lt;- read.table("WellDownload.txt", sep = "\t", header = T) ## To keep it simple, I'm going to keep only those two columns, ## and only the first 100 rows. plotdata &lt;- plotdata[1:100, c("neg_decimal_lat", "decimal_long")] # Then the rest works just fine. #getmap library(ggplot2) library(ggmap) testmap &lt;- get_googlemap(c(lon=135,lat=-32) ,zoom=6, xlim=c(127,142), ylim=c(-23,-34)) #plotting ggmap(testmap) + geom_point(aes(x= decimal_long, y=neg_decimal_lat), data=plotdata, colour="red", size=3) </code></pre> <p>And it works!</p> <p><img src="https://i.stack.imgur.com/S2nrZ.png" alt="enter image description here"></p> <p>There may be other problems in your data. When I read it in, I got warnings:</p> <pre><code>Warning messages: 1: In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : EOF within quoted string 2: In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : number of items read is not a multiple of the number of columns </code></pre> <p>It sounds like the data file has unmatched quotation marks. When I tried to look at the tail of the file, my R session crashed. I'd suggest opening it in a spreadsheet and cleaning it a little before putting it into R.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload