r-lib / prettycode

Syntax highlight R code in the terminal
https://r-lib.github.io/prettycode/
Other
101 stars 9 forks source link

prettycode::prettycode() doesn't work #7

Closed csgillespie closed 5 years ago

csgillespie commented 6 years ago

Running

> prettycode::prettycode()
> mean
function (x, ...) 
UseMethod("mean")
<bytecode: 0x1e5f6f0>
<environment: namespace:base>

The function isn't printed in a pretty way. This

> library(prettycode)
The following object is masked from package:base:

    print.function

> mean
function (x, ...) 
UseMethod("mean")
<environment: namespace:base>

does work

gaborcsardi commented 6 years ago

SEssion info please?

csgillespie commented 6 years ago

Sorry, a bit too quick hitting comment.

> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS

Matrix products: default
BLAS: /usr/lib/atlas-base/atlas/libblas.so.3.0
LAPACK: /usr/lib/atlas-base/atlas/liblapack.so.3.0

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8   
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] prettycode_1.0.2

loaded via a namespace (and not attached):
[1] compiler_3.4.4 withr_2.1.2    crayon_1.3.4  

Ran in /tmp/ with an empty .Rprofile

csgillespie commented 5 years ago

This issue seems to be fixed. It may have been an RStudio issue, but not sure.