ropensci / osmplotr

Data visualisation using OpenStreetMap objects
https://docs.ropensci.org/osmplotr
132 stars 21 forks source link

Post merge fixes #31

Closed richardbeare closed 6 years ago

richardbeare commented 6 years ago

Fixed problems with lapply call - couple of examples of different ways you could do it in the commit message, if you prefer anonymous functions.

Also changed some formatting to pass lint checks, but haven't changed white space much. You may want to run it through your preferred auto-indenter.

codecov-io commented 6 years ago

Codecov Report

Merging #31 into master will increase coverage by 0.18%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #31      +/-   ##
==========================================
+ Coverage   87.33%   87.52%   +0.18%     
==========================================
  Files          21       21              
  Lines        2369     2364       -5     
==========================================
  Hits         2069     2069              
+ Misses        300      295       -5
Impacted Files Coverage Δ
R/line2poly.R 0% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 73a7a2f...5ec72a5. Read the comment docs.

mpadge commented 6 years ago

Thanks @richardbeare! The lapply (, function (i) ..) format is necessary to explicitly declare what follows as a function, and thereby to avoid undefined function warnings on check. Could you please just re-instate these few instances?

richardbeare commented 6 years ago

I'm not seeing that error anywhere - what check detects a problem? devtools::check and R CMD check aren't showing anything. It doesn't make sense to me why wrapping a package function in an anonymous function should avoid a warning. It may be fixed by moving the definitions of the functions called by lapply to before the main function def.