R/pwd.R

#' @name pwd
#' @aliases pwd
#' @rdname pwd-methods
#' @docType methods
#' @description  uses the linux pwd command to determin the working directory 
#' @return A string containing the working directory 
#' @title description of function pwd
#' @export 
setGeneric('pwd', ## Name
		function ( a ) { 
			standardGeneric('pwd')
		}
)

setMethod('pwd', signature = c () ,
		definition = function ( a ) {
			rm(a)
			system( 'pwd > __pwd' )
			t <- read.delim( file = '__pwd', header=F)
			t <- as.vector(t[1,1])
			t <- paste(t,"/",sep='')
			unlink( '__pwd')
			t
		}
)
stela2502/Rscexv documentation built on July 6, 2022, 9:02 p.m.