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 Oct. 29, 2017, 1:12 p.m.