MTES-MCT / savoirfR

Banque d'exercices du parcours r du pôle ministériel MTES-MCTRCT
https://mtes-mct.github.io/savoirfR/index.html
8 stars 3 forks source link

Erreur extract_r_files #32

Closed jdlom closed 2 years ago

jdlom commented 2 years ago

@jengelaere j'ai une erreur quand j'execute la fonction, et c'est lié à gsub

library(savoirfR)
extract_r_files(module = 5)

Est-ce que tu reproduis ?


processing file: inst/vignettes/m5/exo1.rmd
  |.....................................................................| 100%
output file: inst/rstudio/templates/project/ressources/m5/corrections/exo1.R

Error in `mutate_cols()`:
! Problem with `mutate()` column `value`.
ℹ `value = ... %>% ...`.
x zero-length pattern
Caused by error in `gsub()`:
! zero-length pattern
Run `rlang::last_error()` to see where the error occurred.
Warning message:
Problem with `mutate()` column `value`.
ℹ `value = ... %>% ...`.
ℹ argument 'pattern' has length > 1 and only the first element will be used 
jengelaere commented 2 years ago

coucou @jdlom a priori non, j'avais recréé tous les exos pour vérifier que ça marchait, je vérifie et te tiens au courant

jengelaere commented 2 years ago

je reproduis, c'est le . transformé en .data à la va vite après les checks qui n'est pas bon 😕

jengelaere commented 2 years ago
clean_r: no visible binding for global variable '.'
   Undefined global functions or variables:
jdlom commented 2 years ago

Tu peux assigner dans la fonction . <- NULL pour supprimer cette alerte

J'ai déjà vu Colin Fay faire cela

jengelaere commented 2 years ago

C'est pas bien de dénoncer !! 😄 Je t'ai proposé une PR avec une solution pas très élégante qui marche aussi, n'hésite pas à remplacer si tu préfères la solution de Colin