Skip to content

Commit

Permalink
gently linted files
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDedman committed Feb 15, 2024
1 parent 7fe3b58 commit 0fe3bd7
Show file tree
Hide file tree
Showing 10 changed files with 372 additions and 1,704 deletions.
30 changes: 15 additions & 15 deletions R/alignraster.R
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
#' Combines region-specific group-level UD rasters into a single raster.
#'
#' Extends the spatial extent of each area-specific group-level raster to the spatial extent shared by all rasters.
#' This will only be required if you have multiple individuals (e.g. different sharks) divided amongst a few discrete areas
#' (e.g. around different islands) and the effort (e.g. receiver coverage) is different among islands.
#' Not required for multiple individuals all within the same region or sampling regime.
#' Extends the spatial extent of each area-specific group-level raster to the spatial extent shared by all rasters.
#' This will only be required if you have multiple individuals (e.g. different sharks) divided amongst a few discrete areas
#' (e.g. around different islands) and the effort (e.g. receiver coverage) is different among islands.
#' Not required for multiple individuals all within the same region or sampling regime.
#'
#' @param folderroots Character vector of locations of folder roots output by movegroup. Function
#' expects CRS.Rds file and a subfolder with the scaled raster.
#' @param foldernames Character vector names of folders corresponding to files in folderroots, i.e.
#' the names of the objects, arrays, regions, etc.
#' @param folderroots Character vector of locations of folder roots output by movegroup. Function
#' expects CRS.Rds file and a subfolder with the scaled raster.
#' @param foldernames Character vector names of folders corresponding to files in folderroots, i.e.
#' the names of the objects, arrays, regions, etc.
#' @param pattern For input rasters from scaleraster. Default ".asc".
#' @param scalefolder For input rasters from scaleraster. Default "Scaled".
#' @param scaledweightedname For input rasters from scaleraster. Default "All_Rasters_Scaled".
#' @param savefolder Single character entry of folder to save outputs, no trailing slash.
#' @param format Character. Output file type for raster::writeRaster param format. Default ascii,
#' other options have generally not worked well in SD's experience.
#' @param datatype Character. Data type for writing values to disk for raster::writeRaster param
#' datatype. Default FLT4S.
#' @param format Character. Output file type for raster::writeRaster param format. Default ascii,
#' other options have generally not worked well in SD's experience.
#' @param datatype Character. Data type for writing values to disk for raster::writeRaster param
#' datatype. Default FLT4S.
#' @param bylayer For raster::writeRaster param bylayer. Default TRUE.
#' @param overwrite For raster::writeRaster param overwrite. Default TRUE.
#' @param returnObj Logical. Return the scaled object to the parent environment to be assigned as an
#' object? Default FALSE.
#'
#' @return Region-specific group-level UD rasters that share the same spatial extent.
#'
#' @details When used in a movegroup pipeline, the order would be: movegroup.R, scaleraster.R,
#' alignraster.R if required, plotraster.R.
#' @details When used in a movegroup pipeline, the order would be: movegroup.R, scaleraster.R,
#' alignraster.R if required, plotraster.R.
#'
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -143,4 +143,4 @@ alignraster <- function(folderroots = c("/myfolder/H", # character vector of loc
overwrite = overwrite))

if (returnObj) return(rasterlist)
} # close function
} # close function
6 changes: 3 additions & 3 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Data: Tracks of lemon sharks off Bimini, Bahamas
#'
#' Tracks of 17 lemon sharks (Negaprion brevirostris) tagged off Bimini, Bahamas, 2012:2014, by
#' Bimini Biological Field Station employees and volunteers, with accompanying tidal phase.
#' Tracks of 17 lemon sharks (Negaprion brevirostris) tagged off Bimini, Bahamas, 2012:2014, by
#' Bimini Biological Field Station employees and volunteers, with accompanying tidal phase.
#'
#' @format A data frame with 1308 rows and 5 variables:
#' \describe{
Expand Down Expand Up @@ -48,4 +48,4 @@
#' @author Simon Dedman, \email{simondedman@@gmail.com}
#' @author Vital Heim, \email{vital.heim@@gmail.com}
#' @source \url{https://www.savingtheblue.org}
"argosFiltered"
"argosFiltered"
2 changes: 1 addition & 1 deletion R/moveLocErrorCalc.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@ moveLocErrorCalc <- function(x,
rm(tracksfmean)
# return(tracksfmean)
return(meanMoveLocDist)
} # close moveLocErrorCalc function
} # close moveLocErrorCalc function
Loading

0 comments on commit 0fe3bd7

Please sign in to comment.