R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for a HTML browser interface to help. Type 'q()' to quit R. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + delayedAssign("T", stop("T used instead of TRUE"), + assign.env = .CheckExEnv) + delayedAssign("F", stop("F used instead of FALSE"), + assign.env = .CheckExEnv) + sch <- search() + newitems <- sch[! sch %in% .oldSearch] + for(item in rev(newitems)) + eval(substitute(detach(item), list(item=item))) + missitems <- .oldSearch[! .oldSearch %in% sch] + if(length(missitems)) + warning("items ", paste(missitems, collapse=", "), + " have been removed from the search path") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("haplo.score-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('haplo.score') > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "Ginv" > > ### * Ginv > > flush(stderr()); flush(stdout()) > > ### Name: Ginv > ### Title: Compute Generalized Inverse of Input Matrix > ### Aliases: Ginv > > > ### ** Examples > > ## Not run: > ##D save <- Ginv(x) > ##D ginv.x <- save$Ginv > ##D rank.x <- save$rank > ## End(Not run) > > > > cleanEx(); ..nameEx <- "allele.recode" > > ### * allele.recode > > flush(stderr()); flush(stdout()) > > ### Name: allele.recode > ### Title: Recode allele values to integer ranks > ### Aliases: allele.recode > > > ### ** Examples > > > > > > cleanEx(); ..nameEx <- "banner" > > ### * banner > > flush(stderr()); flush(stdout()) > > ### Name: banner > ### Title: Print a nice banner > ### Aliases: banner > > > ### ** Examples > > > banner("This is a pretty banner", banner.width=40, char.perline=30) ======================================== This is a pretty banner ======================================== > > # ======================================== > # This is a pretty banner > # ======================================== > > > > cleanEx(); ..nameEx <- "gcode" > > ### * gcode > > flush(stderr()); flush(stdout()) > > ### Name: gcode > ### Title: Numeric Code for Genotypes > ### Aliases: gcode > > > ### ** Examples > > > > > > cleanEx(); ..nameEx <- "geno.recode" > > ### * geno.recode > > flush(stderr()); flush(stdout()) > > ### Name: geno.recode > ### Title: Recode Genotypes > ### Aliases: geno.recode > > > ### ** Examples > > > > > > cleanEx(); ..nameEx <- "haplo.em" > > ### * haplo.em > > flush(stderr()); flush(stdout()) > > ### Name: haplo.em > ### Title: EM Computation of Haplotype Probabilities > ### Aliases: haplo.em > > > ### ** Examples > > ## Not run: > ##D haplo <- haplo.em(geno) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "haplo.enum" > > ### * haplo.enum > > flush(stderr()); flush(stdout()) > > ### Name: haplo.enum > ### Title: Enumerate all possible pairs of haplotypes that are consistent > ### with a set of un-phased multilocus markers > ### Aliases: haplo.enum > > > ### ** Examples > > > > > > cleanEx(); ..nameEx <- "haplo.hash" > > ### * haplo.hash > > flush(stderr()); flush(stdout()) > > ### Name: haplo.hash > ### Title: Integer Rank Codes for Haplotypes > ### Aliases: haplo.hash > > > ### ** Examples > > > > > > cleanEx(); ..nameEx <- "haplo.score" > > ### * haplo.score > > flush(stderr()); flush(stdout()) > > ### Name: haplo.score > ### Title: Score Statistics for Association of Traits with Haplotypes > ### Aliases: haplo.score > > > ### ** Examples > > ## Not run: > ##D # For quantitative, normally distributed trait: > ##D > ##D haplo.score(y, geno, trait.type = "gaussian") > ##D > ##D # For a binary trait > ##D > ##D haplo.score(y, geno, trait.type = "binomial") > ##D > ##D # For a binary trait, adjusted for sex and age: > ##D > ##D x <- cbind(sex, age) > ##D haplo.score(y, geno, trait.type = "binomial", x.adj=x) > ##D > ##D # For poisson trait: > ##D > ##D haplo.score(y, geno, trait.type="poisson", offset = personYears) > ##D > ##D # For ordinal trait: > ##D > ##D haplo.score(y, geno, trait.type="ordinal") > ## End(Not run) > > > > cleanEx(); ..nameEx <- "haplo.score.glm" > > ### * haplo.score.glm > > flush(stderr()); flush(stdout()) > > ### Name: haplo.score.glm > ### Title: Compute haplotype score statistics for GLM > ### Aliases: haplo.score.glm > > > ### ** Examples > > > > > > cleanEx(); ..nameEx <- "haplo.score.podds" > > ### * haplo.score.podds > > flush(stderr()); flush(stdout()) > > ### Name: haplo.score.podds > ### Title: Compute Haplotype Score Statistics for Ordinal Traits with > ### Proportional Odds Model > ### Aliases: haplo.score.podds > > > ### ** Examples > > > > > > cleanEx(); ..nameEx <- "locator.haplo" > > ### * locator.haplo > > flush(stderr()); flush(stdout()) > > ### Name: locator.haplo > ### Title: Find Location from Mouse Clicks and Print Haplotypes on Plot > ### Aliases: locator.haplo > > > ### ** Examples > > ## Not run: > ##D save <- haplo.score(y, geno, trait.type = "binomial") > ##D > ##D plot(save) > ##D > ##D locator.haplo(save) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "plot.haplo.score" > > ### * plot.haplo.score > > flush(stderr()); flush(stdout()) > > ### Name: plot.haplo.score > ### Title: Plot Haplotype Frequencies versus Haplotype Score Statistics > ### Aliases: plot.haplo.score > > > ### ** Examples > > ## Not run: > ##D save <- haplo.score(y, geno, trait.type = "gaussian") > ##D > ##D # Example illustrating generic plot function: > ##D plot(save) > ##D > ##D # Example illustrating specific method plot function: > ##D plot.haplo.score(save) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "print.haplo.score" > > ### * print.haplo.score > > flush(stderr()); flush(stdout()) > > ### Name: print.haplo.score > ### Title: Print a haplo.score object > ### Aliases: print.haplo.score > > > ### ** Examples > > ## Not run: > ##D save <- haplo.score(y, geno, trait.type = "gaussian") > ##D > ##D # Example illustrating generic print function: > ##D print(save) > ##D > ##D # Example illustrating specific method print function: > ##D print.haplo.score(save) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "ungcode" > > ### * ungcode > > flush(stderr()); flush(stdout()) > > ### Name: ungcode > ### Title: Uncode Numeric Genotype Codes to Alleles > ### Aliases: ungcode > > > ### ** Examples > > > > > ### *