After I installed car package, I can not load Salaries data set - r

> r#quire(car) # Salaries 데이타을 사용을 위해
필요한 패키지를 로딩중입니다: car
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
네임스페이스 ‘pbkrtest’ 0.4-2는 로드되었으나 >= 0.4.4가 필요합니다
In addition: Warning message:
패키지 ‘car’는 R 버전 3.2.5에서 작성되었습니다
> library(car)
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
네임스페이스 ‘pbkrtest’ 0.4-2는 로드되었으나 >= 0.4.4가 필요합니다
In addition: Warning message:
패키지 ‘car’는 R 버전 3.2.5에서 작성되었습니다
Error: package or namespace load failed for ‘car’
> str(Salaries)
Error in str(Salaries) : object 'Salaries' not found
A car package is the default one it already installed when I install r. I tried to download and include it. But It still got the error that it can not find the Salaries data set that included in car package. What is the problem? Sorry for the Korean message. If you let me know to change message in English, I will retry and reupload the message. Below is my console
UPDATE
I updated this error message in English and tried running the comment's one. But still it is not working.
> install.packages("car", dependencies=TRUE)
Warning in install.packages :
dependency ‘pbkrtest’ is not available
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/car_2.1-3.zip'
Content type 'application/zip' length 1447199 bytes (1.4 MB)
downloaded 1.4 MB
package ‘car’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Windows\Temp\Rtmpgr6B80\downloaded_packages
> library(car)
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace ‘pbkrtest’ 0.4-2 is being loaded, but >= 0.4.4 is required
In addition: Warning message:
package ‘car’ was built under R version 3.2.5
Error: package or namespace load failed for ‘car’
> str(Salaries)
Error in str(Salaries) : object 'Salaries' not found

It solved with update r version up to 3.3.2. pbkrtest needs r version to be more than 3.3.2 (newest version). I updated r and reinstall pbkrtest and then car package.

Salaries data set is currently available under [carData package], I solved as the following
install.packages("carData")
data("Salaries", package="carData")
sample_n(Salaries,3)
rank discipline yrs.since.phd yrs.service sex salary
1 Prof B 26 19 Male 193000
2 AssocProf A 13 8 Male 78182
3 AsstProf B 4 3 Male 91000

Related

How do I know if I installed plotly correctly?

Error: package or namespace load failed for ‘plotly’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘fastmap’
In addition: Warning message:
package ‘plotly’ was built under R version 4.2.1

getting an error while using the library(tidyverse)

getting the following error while trying to use library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): namespace ‘ggplot2’ 3.3.0 is being loaded, but >= 3.3.3 is required
I updated ggplot2 many times but still getting the error

Problems to load tidyverse and dplyr

When I try to load tidyverse I get this message:
library("tidyverse")
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘dplyr’ 1.0.2 is already loaded, but >= 1.0.3 is required
Además: Warning message:
package ‘tidyverse’ was built under R version 4.0.3

>library(Rcmdr) #fails to load

I have tried the following steps:
install.packages("Rcmdr", dependencies=TRUE)
install.packages("knitr", dependencies=TRUE)
library(Rcmdr)
output for this step is below
Loading required package: RcmdrMisc
Error: package or namespace load failed for ‘RcmdrMisc’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘knitr’
Error: package ‘RcmdrMisc’ could not be loaded
I'm working in Rversion=3.4.1 & Rstudio=1.0.143

unable to load caret package

library(caret)
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : namespace ‘nlme’ 3.1-121 is already loaded, but >= 3.1.123 is required
In addition: Warning message:
package ‘caret’ was built under R version 3.2.4
Error: package or namespace load failed for ‘caret’

Resources