Trying to run some code involving pivot_longer (from the tidyr package) but keep getting error message that the function could not be found. It seemed to happen following installing the ggpubr package. I have tried re-installing the package, after which I updated R as I was on an older version. Does anyone have any ideas on what to do here? Many thanks in advance! :)
Asked
Active
Viewed 19 times
0
-
3Did you load the package with `library(tidyr)`? What if you explicitly call `tidyr::pivor_longer()`. What version does `sessionInfo()` say you have installed? – MrFlick Aug 01 '23 at 19:34
-
2https://stackoverflow.com/q/7027288/3358272 is a great reference for troubleshooting this problem – r2evans Aug 01 '23 at 19:36
-
2@Danny_0101 please read the answers in the provided link. If they still do not help you, please come back here, [edit] your question to add context of how you looked for it (using methods found in those answers), then @-ping me and we'll try to find what is going on, reopening if needed. Good luck! – r2evans Aug 01 '23 at 19:39
-
1@MrFlick it says I have R version 4.1.2 (2021-11-01). Yes I have loaded with library(tidyr) but I get; Error: package or namespace load failed for ‘tidyr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): namespace ‘dplyr’ 1.0.9 is already loaded, but >= 1.0.10 is required In addition: Warning message: package ‘tidyr’ was built under R version 4.1.3 – Danny_0101 Aug 01 '23 at 19:43
-
3FYI, "package or namespace load failed for ‘tidyr’" means tidyr was not successfully loaded. It sounds like you need to restart your R session and update dplyr. – Jon Spring Aug 01 '23 at 20:08