Mitch Dawson
2002-Jul-11 15:57 UTC
[R] Hmisc and errors with pdf representations of summary plots
I am using V4.1.1, x86, Win32, i386-pc-mingw32 When I use: library(design) library(Hmisc) tmp_summary( DV.days.waiting.for.admit ~ ADMISSION.CLASS.DESC + IMPAIR.ACTIVITY.LIMITATION, data=WD, nmin=0) plot(tmp, cex.labels=.8, groupfont=2) The plot looks great on the screen. However, when I save the plot at any file format lines and formatting are misaligned. The code and data below show this problem with pdf(). Strangley, sometimes for similar plots of different variables the pdf plot looks fine? Any help would be greatly appreciated. Thanks Mitch Dawson ################# library(design) library(Hmisc) pdf("Days Waiting Graphs.pdf", width=11, height=8) # The following dump() was created in R using # tmp_summary( DV.days.waiting.for.admit ~ ADMISSION.CLASS.DESC + IMPAIR.ACTIVITY.LIMITATION, data=WD, nmin=0) "tmp" <- structure(c(50, 4086, 214, 26, 16, 1584, 2807, 4392, 46.18, 7.79882525697504, 18.303738317757, 4.69230769230769, 8.1875, 9.28977272727273, 8.41824011400071, 8.7306466302368), .Dim = c(8, 2), .Dimnames = list( c("Continuing Rehabilitation", "Initial Rehabilitation", "Re-admission", "Short Stay", "Unplanned discharge without assessment", "No", "Yes", ""), c("N", "DV.days.waiting.for.admit")), formula DV.days.waiting.for.admit ~ ADMISSION.CLASS.DESC + IMPAIR.ACTIVITY.LIMITATION, call summary.formula(formula = DV.days.waiting.for.admit ~ ADMISSION.CLASS.DESC + IMPAIR.ACTIVITY.LIMITATION, data = WD, nmin = 0), n = 4392, nmiss = 1, yname = "DV.days.waiting.for.admit", ylabel = "DV.days.waiting.for.admit", ycolname "DV.days.waiting.for.admit", funlab = "mean", vname c("ADMISSION.CLASS.DESC", "", "", "", "", "IMPAIR.ACTIVITY.LIMITATION", "", "Overall"), vlabel c("ADMISSION.CLASS.DESC", "", "", "", "", "IMPAIR.ACTIVITY.LIMITATION", "", "Overall"), nlevels = c(5, 2, 1), labels = c("ADMISSION.CLASS.DESC", "IMPAIR.ACTIVITY.LIMITATION", "Overall"), strat.name = "", strat.label = "", strat.levels = "", class "summary.formula.response") plot(tmp, cex.labels=.8, groupfont=2) dev.off() -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._