paul-carteron / happign

Happign allows you to use the APIs provided by the IGN (France) to download their public data.
https://paul-carteron.github.io/happign/
GNU General Public License v3.0
30 stars 2 forks source link

unexpected input "\" #3

Closed MiloMonnier closed 2 years ago

MiloMonnier commented 2 years ago

https://github.com/paul-carteron/happign/blob/997113ab1a90f5493a18fe4aa9734e000976022a/R/get_apicarto_cadastre.R#L160

It looks like a "\" has been accidentally introduced during last commit and makes package installation fail :

> install.packages("happign")
...
* installing *source* package ‘happign’ ...
** package ‘happign’ correctement décompressé et sommes MD5 vérifiées
** using staged installation
** R
Error in parse(outFile) : 
  /tmp/RtmpAph375/R.INSTALLe5b93f4ae0a6/happign/R/get_apicarto_cadastre.R:160:22: unexpected input
159:    nb_loop <- lapply(urls$url,
160:                      \
                          ^
ERROR: unable to collate and parse R files for package ‘happign’
paul-carteron commented 2 years ago

Hi Milo, Thanks for your comment. I cannot reproduce the problem during installation.

\(x){return(x)} is a new syntax for anonymous function since R 4.1.0. Before it was : function(x){return(x)}. Can you send me youre session info with sessionInfo() please ?

MiloMonnier commented 2 years ago

Ok I didn't know this syntax ! Indeed my R version was 4.0.4

R version 4.0.4 (2021-02-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 11 (bullseye)

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

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

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

loaded via a namespace (and not attached):
[1] compiler_4.0.4

I updated to R 4.2.1 and now it's working. Thanks !

paul-carteron commented 2 years ago

Alrigth, so I close this issue.