getMethods(mname) will retrieve definitions for all methods named mname
getMethod(mname, sig) will retrieve definition for specified signature

for your query

> getMethod("readFastq", "character")
Method Definition:

function (dirPath, pattern = character(0), ...)
{
    .local <- function (dirPath, pattern = character(0), ...,
        qualityType = c("Auto", "FastqQuality", "SFastqQuality"),
        filter = srFilter(), withIds = TRUE)
    {
        if (!missing(filter))
            .check_type_and_length(filter, "SRFilter", NA)
        tryCatch(qualityType <- match.arg(qualityType), error =
function(err) {
            .throw(SRError("UserArgumentMismatch", conditionMessage(err)))
        })
        src <- .file_names(dirPath, pattern)
        elts <- .Call(.read_solexa_fastq, src, withIds)
        qualityFunc <- switch(qualityType, Auto = {
            alf <- alphabetFrequency(elts[["quality"]], collapse = TRUE)
            if (min(which(alf != 0)) < 59) FastqQuality else SFastqQuality
        }, SFastqQuality = SFastqQuality, FastqQuality = FastqQuality)
        quality <- qualityFunc(elts[["quality"]])
        srq <- if (withIds)
            ShortReadQ(elts[["sread"]], quality, elts[["id"]])
        else ShortReadQ(elts[["sread"]], quality)
        if (!missing(filter))
            srq <- srq[filter(srq)]
        srq
    }
    .local(dirPath, pattern, ...)
}
<environment: namespace:ShortRead>

Signatures:
        dirPath
target  "character"
defined "character"

it might be easier just to obtain the source version of the package and read
as text

On Sat, May 22, 2010 at 5:30 PM, Peng Yu <pengyu.ut@gmail.com> wrote:

> I want to show the definition of readFastq. But showMethods doesn't
> show the function where I can find the body. Would you please let me
> know how to show the body of the function.
>
> > library(ShortRead)
> > showMethods('readFastq')
> Function: readFastq (package ShortRead)
> dirPath="SolexaPath"
> dirPath="character"
>
>
> --
> Regards,
> Peng
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

