I have the tidyverse and tidyr packages both installed and running on R studio and I even ran the library command, and it worked, but there's when I try and run a tidyverse command I get the error, Error in pivot_wider(BirthData, names_from = OSHPDID, values_form = Rate) : could not find function "pivot_wider" Which shouldn't be possible because I have Tidyverse installed, and it runs when I use the library function. I know that all of my inputs work because I've tested the code amongst my peers, who packages do work and the code works for them, just not for me. I believe it's an installation problem, is there anyway I can fix this error? Thank you! [[alternative HTML version deleted]]
Try running dplyr::pivot_wider() Sent from my iPhone> On 20 Oct 2025, at 9:37, Davis Willsie via R-help <r-help at r-project.org> wrote: > > ?I have the tidyverse and tidyr packages both installed and running on R > studio and I even ran the library command, and it worked, but there's when > I try and run a tidyverse command I get the error, > Error in pivot_wider(BirthData, names_from = OSHPDID, values_form = Rate) : > could not find function "pivot_wider" > Which shouldn't be possible because I have Tidyverse installed, and it runs > when I use the library function. I know that all of my inputs work because > I've tested the code amongst my peers, who packages do work and the code > works for them, just not for me. I believe it's an installation problem, is > there anyway I can fix this error? > Thank you! > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide https://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
The command should have worked, and that is sometimes a clue.
1) There are parts of tidyverse that are attached if tidyverse is installed and
attached, and then there are parts that are not. You can find this in the
documentation or ask someone like ChatGPT "what parts of tidyverse require
a separate library() command and which ones work with only
library(tidyverse)?"
2) Sometimes I have working code that suddenly does not work. Try making sure
that all packages are using the latest version.
-----Original Message-----
From: R-help <r-help-bounces at r-project.org> On Behalf Of Davis Willsie
via R-help
Sent: Sunday, October 19, 2025 4:19 PM
To: r-help at r-project.org
Subject: [R] Tidyverse package error
[External Email]
I have the tidyverse and tidyr packages both installed and running on R studio
and I even ran the library command, and it worked, but there's when I try
and run a tidyverse command I get the error, Error in pivot_wider(BirthData,
names_from = OSHPDID, values_form = Rate) :
could not find function "pivot_wider"
Which shouldn't be possible because I have Tidyverse installed, and it runs
when I use the library function. I know that all of my inputs work because
I've tested the code amongst my peers, who packages do work and the code
works for them, just not for me. I believe it's an installation problem, is
there anyway I can fix this error?
Thank you!
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.r-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
There may be more to the story than we've been given. What is the entire output when you open R and run this command: library(tidyverse) And what is the entire output when you then run sessionInfo() --Chris Ryan Davis Willsie via R-help wrote:> I have the tidyverse and tidyr packages both installed and running on R > studio and I even ran the library command, and it worked, but there's when > I try and run a tidyverse command I get the error, > Error in pivot_wider(BirthData, names_from = OSHPDID, values_form = Rate) : > could not find function "pivot_wider" > Which shouldn't be possible because I have Tidyverse installed, and it runs > when I use the library function. I know that all of my inputs work because > I've tested the code amongst my peers, who packages do work and the code > works for them, just not for me. I believe it's an installation problem, is > there anyway I can fix this error? > Thank you! > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide https://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >