% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/find_functions.R
\name{find_functions}
\alias{find_functions}
\title{Find Functions used in a Function or Functions in a List of Function Names}
\usage{
find_functions(
  func,
  nonative = 1,
  noglobal = 0,
  sort = 1,
  packages = NULL,
  unlist = 1
)
}
\arguments{
\item{func}{A function object (no quote) or
a list/vector of the function object names.}

\item{nonative}{= 0 to print the R native functions.}

\item{noglobal}{= 1 not to print the functions defined in the global env.}

\item{sort}{= 0 not to sort the result}

\item{packages}{A character vector containing the names of the packages.
\cr The functions included in those packages will not be printed.}

\item{unlist}{= 0 to output the result in a list when func is a
list or vector.}
}
\value{
A character vector containing the function names.
}
\description{
Find Functions used in a Function or Functions in a List of Function Names
}
\details{
\cr
This function  requires "codetools" package.
\cr
}
\examples{
\dontrun{
library(codetools)
library(lazy.tools)

find_functions( is.varname )

res1 <- find_functions( ls("package:lazy.tools") )
res2 <- find_functions( ls("package:lazy.tools"), unlist=0 )
res3 <- find_functions(
         ls("package:lazy.tools"), unlist=0, packages="lazy.tools" )
Print(res1,res2,res3)

# funclist <- ls("package:lazy.tools")
# res <- sort( unique( unlist( lapply( funclist, find_functions ) ) ) )
# res <- unique( unlist( lapply(
            funclist, find_functions, packages="lazy.tools" )
             ) )
}

}
\references{
The answer by kohske (answered Aug 9 '12 at 7:51) at: \cr\cr
  http://stackoverflow.com/questions/11872879/
   finding-out-which-functions-are-called-within-a-given-function
}
