| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

RToolkitWhereInTheWorld

Page history last edited by PBworks 17 years, 6 months ago

Where in the world

 

R has some cool mapping functionality in its "maps" package. This little function allows you to input a lat/long and it will plot a map for you with a red X marking the spot!

 

whereInTheWorld<-function(lat,long) {

require(maps)

require(mapproj)

map()

points(mapproject(list(y=lat,x=long)),col=2,pch="x",cex=1.5)

}

 

 

For example,

 

> whereInTheWorld(37.7, -25.7), gives the picture below. However, note that google earth also allows you do this via the URL, try http://maps.google.com/?q=37.7,-25.7 , you'll need to zoom out! So lots of cool ways to find yourself.

 

Comments (0)

You don't have permission to comment on this page.