harrelfe / Hmisc

Harrell Miscellaneous
Other
208 stars 81 forks source link

Problem with version 4.0-1 html(describe(foo)) on Windows #63

Open petestmarie opened 7 years ago

petestmarie commented 7 years ago

d <- Hmisc::describe(iris) Hmisc::html(d)

fails with

Error in png(file, width = 1 + k w, height = h) : unable to start png() device In addition: Warning messages: 1: In png(file, width = 1 + k w, height = h) : unable to open file '/tmp\file30b0385c4caf.png' for writing 2: In png(file, width = 1 + k * w, height = h) : opening device failed

If I downgrade to Hmisc version 4.0-0 it works fine.

Also, running the following works fine:

my_tempfile <- tempfile(fileext = ".csv") write.csv(iris, file = my_tempfile) foo <- read.csv(my_tempfile)

devtools::session_info()

Session info -------------------------------------- setting value
version R version 3.3.2 (2016-10-31) system i386, mingw32
ui RStudio (1.0.136)
language (EN)
collate English_United States.1252
tz America/New_York
date 2016-12-08

Packages ------------------- package * version date source
acepack 1.4.1 2016-10-29 CRAN (R 3.3.1)
assertthat 0.1 2013-12-06 CRAN (R 3.2.3)
base64 2.0 2016-05-10 CRAN (R 3.3.2)
cluster 2.0.5 2016-10-08 CRAN (R 3.3.2)
colorspace 1.3-1 2016-11-18 CRAN (R 3.3.2)
data.table 1.10.0 2016-12-03 CRAN (R 3.3.2)
devtools 1.12.0 2016-06-24 CRAN (R 3.3.1)
digest 0.6.10 2016-08-02 CRAN (R 3.3.1)
foreign 0.8-67 2016-09-13 CRAN (R 3.3.1)
Formula 1.2-1 2015-04-07 CRAN (R 3.2.3)
ggplot2 2.2.0 2016-11-11 CRAN (R 3.3.2)
gridExtra 2.2.1 2016-02-29 CRAN (R 3.2.3)
gtable 0.2.0 2016-02-26 CRAN (R 3.2.3)
Hmisc 4.0-1 2016-12-08 CRAN (R 3.3.2)
htmlTable 1.7 2016-10-19 CRAN (R 3.3.1)
htmltools 0.3.5 2016-03-21 CRAN (R 3.2.4)
knitr 1.15.1 2016-11-22 CRAN (R 3.3.2)
lattice 0.20-34 2016-09-06 CRAN (R 3.3.1)
latticeExtra 0.6-28 2016-02-09 CRAN (R 3.2.3)
lazyeval 0.2.0.9000 2016-07-13 Github (hadley/lazyeval@c155c3d) magrittr 1.5 2014-11-22 CRAN (R 3.2.3)
Matrix 1.2-7.1 2016-09-01 CRAN (R 3.3.1)
memoise 1.0.0 2016-01-29 CRAN (R 3.2.3)
munsell 0.4.3 2016-02-13 CRAN (R 3.2.3)
nnet 7.3-12 2016-02-02 CRAN (R 3.2.3)
openssl 0.9.5 2016-10-28 CRAN (R 3.3.1)
plyr 1.8.4 2016-06-08 CRAN (R 3.3.0)
RColorBrewer 1.1-2 2014-12-07 CRAN (R 3.2.3)
Rcpp 0.12.8 2016-11-17 CRAN (R 3.3.2)
rpart 4.1-10 2015-06-29 CRAN (R 3.3.2)
rstudioapi 0.6 2016-06-27 CRAN (R 3.3.1)
scales 0.4.1 2016-11-09 CRAN (R 3.3.2)
stringi 1.1.2 2016-10-01 CRAN (R 3.3.1)
stringr 1.1.0.9000 2016-08-25 Github (hadley/stringr@d1a258f) survival 2.40-1 2016-10-30 CRAN (R 3.3.2)
tibble 1.2 2016-08-26 CRAN (R 3.3.1)
withr 1.0.2 2016-06-20 CRAN (R 3.3.0)

harrelfe commented 7 years ago

Sorry about that. A fix is committed for the next release. You can use

source('https://raw.githubusercontent.com/harrelfe/Hmisc/master/R/latexTherm.s') in your R script to apply the fix now.