Making section breaks informative (name of function) so as to enhance browsing of functions
Improvements to addmapvars() function:
Where there existed temp, we now have temp0 and temp. The grouped slice object is temp0, from which temp is created at each step, so as to prevent repeating the intensive grouped slice step.
Commented require(data.table) because I did not find it necessary for this function.
Piped the overlay steps for clarity, and also removed the redundant step temp = data.frame(temp) because sp::over() produces dataframe by default when used with SPDFs.
Ashwin, can you please have a look at the suggestions I have made to the main functions script (SoIB_v2 functions.R)? Edits include:
addmapvars()
function:temp
, we now havetemp0
andtemp
. The grouped slice object istemp0
, from whichtemp
is created at each step, so as to prevent repeating the intensive grouped slice step.require(data.table)
because I did not find it necessary for this function.temp = data.frame(temp)
becausesp::over()
produces dataframe by default when used with SPDFs.