R/source.R

Defines functions getPackagePath

Documented in getPackagePath

#' function to find package folder
#' @export
#' @param char , name of package
#' @param booleen , set work directory to path of package?
#' @return path of package
#' @examples
#' getPackagePath(name="base",setAsWD=FALSE)
#' 
getPackagePath = function(setAsWD=FALSE,name="ffIntro") {
  path = system.file(package='ffIntro')
  if(setAsWD) setwd(path)
  return(path)
}
sorhawell/ffIntro documentation built on May 30, 2019, 6:32 a.m.