USF-IMARS / mbon_zooplankton_to_dwc

This repository is used to setup a pipeline to convert zooplankton data into OBIS formats
0 stars 1 forks source link

fix_prev_zoo_data.qmd "could not find function "separate_wider_regex"" #5

Closed 7yl4r closed 1 year ago

7yl4r commented 1 year ago

getting this error from Line 104 in Rmd/fix_prev_zoo_data.qmd:

Error in separate_wider_regex(., sheet, cols_remove = TRUE, patterns = c(stn = "\\w{2}",  : 
  could not find function "separate_wider_regex"

What package should separate_wider_regex be coming from?

Tidyr? ref

but when I try to namespace it (ie tidyr::separate_wider_regex) I get:

Error: 'separate_wider_regex' is not an exported object from 'namespace:tidyr'

Is this a package version mismatch? I am using:

sebastiandig commented 1 year ago

This is probably a versioning issue. I use tidyr version 1.3.0. They are superseding tidyr::separate in favor of tidyr::separate_wider_ or tidyr::separate_longer_.

You can use pak::pkg_install() to update. You might need to install pak and you can use install.packages("pak") or librarian::shelf(pak)

Let me know if updating helps.

7yl4r commented 1 year ago

librarian::shelf(tidyverse, update_all=TRUE) fixed it