R's default package stats are erased and "Package 'stats' does not have namespace" is displayed

Asked 2 years ago, Updated 2 years ago, 267 views

Please help me.
R's default package, stats, has been erased.

The following is the background

  • Filter_ and mutate_ are not available in function, so search online
    →A blog says, "You can delete stats with remove" and executes
  • Tidyverse and all the other packages that have been useful up until now will be unusable

Currently, the following is displayed:

library(tidyverse)
 Error: package or namespace load failed for 'tidyverse':
  Package 'stats' does not have namespace 

When I restart Rstudio, it shows as follows, and I can't help it.

Preparing to boot - Warning message: 
package 'stats' in options ("defaultPackages") was not found 
 ERROR: package 'stats' does not have a name space
 warning:namespace'stats' is not available and has been replaced
by.GlobalEnv when processing object 'full.model'

 ERROR: package 'stats' does not have a name space
 ERROR: package 'stats' does not have a name space
 ERROR: package 'stats' does not have a name space
 ERROR: package 'stats' does not have a name space

I thought about uninstalling R itself, but I was afraid that the previous files might disappear.
Also, after reinstalling stats, we were unable to install tidyverse and so on.

I'm in despair because I haven't finished my assignment to use it at university.Someone please help me.

r

2022-09-30 21:55

1 Answers

Why don't you use library(dplyr) instead of library(tidyverse)?
Tidyverse has dplyr inside, so I think dplyr can replace it.
Also, other packages have functions with the same name as filter, so
If I write dplyr::mute or dplyr::filter, can't I improve it?


2022-09-30 21:55

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.