Deg.to.merc package?

4 views
Skip to first unread message

Alexandra McInturf

unread,
May 15, 2017, 1:38:17 PM5/15/17
to davi...@googlegroups.com
Hey all -

This should be a simple question, but does anyone know the package that is required for the function used to convert deg to mercator units in R?

Thanks!

Alex

Alexandra McInturf
PhD Student, Animal Behavior
Biotelemetry Laboratory
University of California, Davis
amci...@ucdavis.edu  
agmci...@gmail.com



Ryan Peek

unread,
May 15, 2017, 2:13:26 PM5/15/17
to davi...@googlegroups.com
Hi Alex,

If you can get your data into a spatial dataframe you can use: rgdal::spTransform to re-project most any data, if you know your current projection/units.

However, a newish package called "sf" makes working with spatial data really easy, and I'd recommend using it. It pulls the spatial data in, but retains a "tidy" dataframe you can work with much more easily. Basic functions you may use within the package:
  • st_read() to get a shape/raster/spatial data in
  • st_set_crs() set a coordinate reference system if it doesn't have one
  • st_transform() transform your CRS to something new
  • st_crs() double check it worked
Good luck!

R

--
Check out our R resources at http://d-rug.github.io/
---
You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/davis-rug.
For more options, visit https://groups.google.com/d/optout.



--

 
"When we try to pick out anything by itself, we find it hitched to everything else in the universe."
John Muir (My First Summer in the Sierra, 1911)
-----------------------------------------------------
Ryan Peek
PhD Candidate, Graduate Group in Ecology
Center for Watershed Sciences, UC Davis

-----------------------------------------------------
Reply all
Reply to author
Forward
0 new messages