moodymudskipper / flow

View and Browse Code Using Flow Diagrams
https://moodymudskipper.github.io/flow/
Other
395 stars 26 forks source link

Function not found: deparse1 #68

Closed weerasuriya closed 2 years ago

weerasuriya commented 3 years ago

Hi.

This looks like a very interesting package and effort; it could be very helpful for getting up to speed with code from collaborators.

I'm currently running into issues getting a toy example to run:

library(flow)

flow_view(mean)
#> Error in deparse1(substitute(x)): could not find function "deparse1"

Here's my session information:

sessionInfo()
#> R version 3.6.3 (2020-02-29)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Arch Linux
#> 
#> Matrix products: default
#> BLAS:   /usr/lib/libopenblasp-r0.3.14.so
#> LAPACK: /usr/lib/liblapack.so.3.9.1
#> 
#> locale:
#>  [1] LC_CTYPE=en_GB.UTF-8    LC_NUMERIC=C            LC_TIME=en_GB.UTF-8    
#>  [4] LC_COLLATE=en_GB.UTF-8  LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
#>  [7] LC_PAPER=en_GB.UTF-8    LC_NAME=C               LC_ADDRESS=C           
#> [10] LC_TELEPHONE=C          LC_MEASUREMENT=C        LC_IDENTIFICATION=C    
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#>  [1] knitr_1.31        magrittr_2.0.1    rlang_0.4.10      fansi_0.4.2      
#>  [5] stringr_1.4.0     styler_1.4.1      highr_0.8         tools_3.6.3      
#>  [9] xfun_0.22         utf8_1.2.1        withr_2.4.2       htmltools_0.5.1.1
#> [13] ellipsis_0.3.1    yaml_2.2.1        digest_0.6.27     tibble_3.1.1     
#> [17] lifecycle_1.0.0   crayon_1.4.1      purrr_0.3.4       vctrs_0.3.7      
#> [21] fs_1.5.0          glue_1.4.2        evaluate_0.14     rmarkdown_2.7    
#> [25] reprex_2.0.0      stringi_1.5.3     compiler_3.6.3    pillar_1.6.0     
#> [29] backports_1.2.1   pkgconfig_2.0.3

A quick look through the repository code shows a call to deparse1 but no function definition anywhere. Any thoughts? Thanks.

moodymudskipper commented 3 years ago

Thanks, you are using R 3.6.3 and flow uses base::deparse1 which was introduced in R 4.0.0.

I will copy it locally so it works seemlessly for you. Meanwhile I think if you call deparse1 <- backports::deparse1 in your console, you'll be able to make it work.

weerasuriya commented 3 years ago

Ah great, thank you very much. Seems to work now with backports on R/3.6.3.

gadenbuie commented 2 years ago

Can we re-open this issue? I do a lot of work in R 3.6.x and it'd be nice to have the backport available in the package.

moodymudskipper commented 2 years ago

Sure!

github-actions[bot] commented 1 year ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.