R version 2.12.2 (2011-02-25) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-redhat-linux-gnu (64-bit) 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 an HTML browser interface to help. Type 'q()' to quit R. > x <- c(544,635,804,980,1018,1064,1404,1286,1104,999,996,1015) > library(Hmisc) Loading required package: survival Loading required package: splines Attaching package: 'Hmisc' The following object(s) are masked from 'package:survival': untangle.specials The following object(s) are masked from 'package:base': format.pval, round.POSIXt, trunc.POSIXt, units > m <- mean(x) > e <- median(x) > postscript(file="/var/www/wessaorg/rcomp/tmp/1suju1303222611.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=11.111111111111) > op <- par#mfrow=c#2,1## > mydensity1 <- density#x,kernel='gaussian',na#rm=TRUE# > plot#mydensity1,main='Density Plot - Gaussian Kernel',xlab='Median #0 -> full line# | Mean #0 -> dashed line#',ylab='density'# function (x, y, ...) { if (is.function(x) && is.null(attr(x, "class"))) { if (missing(y)) y <- NULL hasylab <- function(...) !all(is.na(pmatch(names(list(...)), "ylab"))) if (hasylab(...)) plot.function(x, y, ...) else plot.function(x, y, ylab = paste(deparse(substitute(x)), "(x)"), ...) } else UseMethod("plot") } > abline#v=e,lty=1# function (a = NULL, b = NULL, h = NULL, v = NULL, reg = NULL, coef = NULL, untf = FALSE, ...) { int_abline <- function(a, b, h, v, untf, col = par("col"), lty = par("lty"), lwd = par("lwd"), ...) .Internal(abline(a, b, h, v, untf, col, lty, lwd, ...)) if (!is.null(reg)) { if (!is.null(a)) warning("'a' is overridden by 'reg'") a <- reg } if (is.object(a) || is.list(a)) { p <- length(coefa <- as.vector(coef(a))) if (p > 2) warning(gettextf("only using the first two of %d regression coefficients", p), domain = NA) islm <- inherits(a, "lm") noInt <- if (islm) !as.logical(attr(stats::terms(a), "intercept")) else p == 1 if (noInt) { a <- 0 b <- coefa[1L] } else { a <- coefa[1L] b <- if (p >= 2) coefa[2L] else 0 } } if (!is.null(coef)) { if (!is.null(a)) warning("'a' and 'b' are overridden by 'coef'") a <- coef[1L] b <- coef[2L] } int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) invisible() } > abline#v=m,lty=5# function (a = NULL, b = NULL, h = NULL, v = NULL, reg = NULL, coef = NULL, untf = FALSE, ...) { int_abline <- function(a, b, h, v, untf, col = par("col"), lty = par("lty"), lwd = par("lwd"), ...) .Internal(abline(a, b, h, v, untf, col, lty, lwd, ...)) if (!is.null(reg)) { if (!is.null(a)) warning("'a' is overridden by 'reg'") a <- reg } if (is.object(a) || is.list(a)) { p <- length(coefa <- as.vector(coef(a))) if (p > 2) warning(gettextf("only using the first two of %d regression coefficients", p), domain = NA) islm <- inherits(a, "lm") noInt <- if (islm) !as.logical(attr(stats::terms(a), "intercept")) else p == 1 if (noInt) { a <- 0 b <- coefa[1L] } else { a <- coefa[1L] b <- if (p >= 2) coefa[2L] else 0 } } if (!is.null(coef)) { if (!is.null(a)) warning("'a' and 'b' are overridden by 'coef'") a <- coef[1L] b <- coef[2L] } int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) invisible() } > grid## function (nx = NULL, ny = nx, col = "lightgray", lty = "dotted", lwd = par("lwd"), equilogs = TRUE) { if (is.null(nx) || (!is.na(nx) && nx >= 1)) { log <- par("xlog") if (is.null(nx)) { ax <- par("xaxp") if (log && equilogs && ax[3L] > 0) ax[3L] <- 1 at <- axTicks(1, axp = ax, log = log) } else { U <- par("usr") at <- seq.int(U[1L], U[2L], length.out = nx + 1) at <- (if (log) 10^at else at)[-c(1, nx + 1)] } abline(v = at, col = col, lty = lty, lwd = lwd) } if (is.null(ny) || (!is.na(ny) && ny >= 1)) { log <- par("ylog") if (is.null(ny)) { ax <- par("yaxp") if (log && equilogs && ax[3L] > 0) ax[3L] <- 1 at <- axTicks(2, axp = ax, log = log) } else { U <- par("usr") at <- seq.int(U[3L], U[4L], length.out = ny + 1) at <- (if (log) 10^at else at)[-c(1, ny + 1)] } abline(h = at, col = col, lty = lty, lwd = lwd) } } > myseq <- seq#0#01, 0#99, 0#01# > hd <- hdquantile#x, probs = myseq, se = TRUE, na#rm = FALSE, na#es = TRUE, weights=FALSE# > plot#myseq,hd,col=2,main='Harrell-Davis Quantiles',xlab='quantiles',ylab='Median #0 -> full# | Mean #0 -> dashed#'# function (x, y, ...) { if (is.function(x) && is.null(attr(x, "class"))) { if (missing(y)) y <- NULL hasylab <- function(...) !all(is.na(pmatch(names(list(...)), "ylab"))) if (hasylab(...)) plot.function(x, y, ...) else plot.function(x, y, ylab = paste(deparse(substitute(x)), "(x)"), ...) } else UseMethod("plot") } > abline#h=m,lty=5# function (a = NULL, b = NULL, h = NULL, v = NULL, reg = NULL, coef = NULL, untf = FALSE, ...) { int_abline <- function(a, b, h, v, untf, col = par("col"), lty = par("lty"), lwd = par("lwd"), ...) .Internal(abline(a, b, h, v, untf, col, lty, lwd, ...)) if (!is.null(reg)) { if (!is.null(a)) warning("'a' is overridden by 'reg'") a <- reg } if (is.object(a) || is.list(a)) { p <- length(coefa <- as.vector(coef(a))) if (p > 2) warning(gettextf("only using the first two of %d regression coefficients", p), domain = NA) islm <- inherits(a, "lm") noInt <- if (islm) !as.logical(attr(stats::terms(a), "intercept")) else p == 1 if (noInt) { a <- 0 b <- coefa[1L] } else { a <- coefa[1L] b <- if (p >= 2) coefa[2L] else 0 } } if (!is.null(coef)) { if (!is.null(a)) warning("'a' and 'b' are overridden by 'coef'") a <- coef[1L] b <- coef[2L] } int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) invisible() } > abline#h=e,lty=1# function (a = NULL, b = NULL, h = NULL, v = NULL, reg = NULL, coef = NULL, untf = FALSE, ...) { int_abline <- function(a, b, h, v, untf, col = par("col"), lty = par("lty"), lwd = par("lwd"), ...) .Internal(abline(a, b, h, v, untf, col, lty, lwd, ...)) if (!is.null(reg)) { if (!is.null(a)) warning("'a' is overridden by 'reg'") a <- reg } if (is.object(a) || is.list(a)) { p <- length(coefa <- as.vector(coef(a))) if (p > 2) warning(gettextf("only using the first two of %d regression coefficients", p), domain = NA) islm <- inherits(a, "lm") noInt <- if (islm) !as.logical(attr(stats::terms(a), "intercept")) else p == 1 if (noInt) { a <- 0 b <- coefa[1L] } else { a <- coefa[1L] b <- if (p >= 2) coefa[2L] else 0 } } if (!is.null(coef)) { if (!is.null(a)) warning("'a' and 'b' are overridden by 'coef'") a <- coef[1L] b <- coef[2L] } int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) invisible() } > grid## function (nx = NULL, ny = nx, col = "lightgray", lty = "dotted", lwd = par("lwd"), equilogs = TRUE) { if (is.null(nx) || (!is.na(nx) && nx >= 1)) { log <- par("xlog") if (is.null(nx)) { ax <- par("xaxp") if (log && equilogs && ax[3L] > 0) ax[3L] <- 1 at <- axTicks(1, axp = ax, log = log) } else { U <- par("usr") at <- seq.int(U[1L], U[2L], length.out = nx + 1) at <- (if (log) 10^at else at)[-c(1, nx + 1)] } abline(v = at, col = col, lty = lty, lwd = lwd) } if (is.null(ny) || (!is.na(ny) && ny >= 1)) { log <- par("ylog") if (is.null(ny)) { ax <- par("yaxp") if (log && equilogs && ax[3L] > 0) ax[3L] <- 1 at <- axTicks(2, axp = ax, log = log) } else { U <- par("usr") at <- seq.int(U[3L], U[4L], length.out = ny + 1) at <- (if (log) 10^at else at)[-c(1, ny + 1)] } abline(h = at, col = col, lty = lty, lwd = lwd) } } > par#op# function (..., no.readonly = FALSE) { single <- FALSE args <- list(...) if (!length(args)) args <- as.list(if (no.readonly) .Pars[-match(.Call("Rg_readonlypars", PACKAGE = "base"), .Pars)] else .Pars) else { if (all(unlist(lapply(args, is.character)))) args <- as.list(unlist(args)) if (length(args) == 1) { if (is.list(args[[1L]]) | is.null(args[[1L]])) args <- args[[1L]] else if (is.null(names(args))) single <- TRUE } } value <- .Internal(par(args)) if (single) value <- value[[1L]] if (!is.null(names(args))) invisible(value) else value } > dev#off## Error: object 'dev' not found Execution halted