找不到CreateTataPartition
大家好的一天, 我尝试使用以下代码在R中安装CARET软件包,但是我遇到了一个错误,说明尽管试图安装它,但仍未找到 Stringi ,但我的尝试失败了。
另外,我尝试使用CREATE CreateAtapartition
函数对数据进行分区,但是我得到了错误“ **无法找到函数createAtapartition
我使用的代码:
install.packages("caret")
library(caret)
install.packages("stringi")
library(stringi)
结果如下:下面:
**install.packages("caret")**
*Installing package into ‘C:/Users/Anuli/OneDrive - The University of Texas-Rio Grande Valley/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘CARET’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Warning in install.packages :
Perhaps you meant ‘caret’ ?*
**library(caret)**
*Loading required package: ggplot2
Loading required package: lattice
Error: package or namespace load failed for ‘caret’ in library.dynam(lib, package, package.lib):
DLL ‘stringi’ not found: maybe not installed for this architecture?*
**install.packages("stringi")**
*Installing package into ‘C:/Users/Anuli/OneDrive - The University of Texas-Rio Grande Valley/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/stringi_1.7.6.zip'
Content type 'application/zip' length 16449819 bytes (15.7 MB)
downloaded 15.7 MB
package ‘stringi’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot delete reparse point 'C:\Users\Anuli\OneDrive - The University of Texas-Rio Grande Valley\Documents\R\win-library\4.1/stringi/libs/x64', reason 'There is a mismatch between the tag specified in the request and the tag present in the reparse point'
Warning in install.packages :
cannot remove prior installation of package ‘stringi’
Warning in install.packages :
cannot delete reparse point 'C:\Users\Anuli\OneDrive - The University of Texas-Rio Grande Valley\Documents\R\win-library\4.1/stringi/libs/x64', reason 'There is a mismatch between the tag specified in the request and the tag present in the reparse point'
Warning in install.packages :
restored ‘stringi’
The downloaded binary packages are in
C:\Users\Anuli\AppData\Local\Temp\RtmpyqAGs4\downloaded_packages*
**library(stringi)**
*Error: package or namespace load failed for ‘stringi’ in library.dynam(lib, package, package.lib):
DLL ‘stringi’ not found: maybe not installed for this architecture?*
由于未发现错误,我无法将数据分开:
myData$cyl <- as.factor(myData$cyl)
sapply(myData, is.factor)
mpg cyl disp hp drat wt qsec vs am gear carb
FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
set.seed(1)
index <- createDataPartition(myData$cyl, p=0.75, list=FALSE)
Error in createDataPartition(myData$cyl, p = 0.75, list = FALSE) :
could not find function "createDataPartition"
Good day everyone,
I tried installing the caret package in R with the following codes but I am having an error stating that Stringi is not found despite trying to install that, I got a failed attempt.
Also, I tried to partition my data using the create createDataPartition
function but I got the error "**could not find function createDataPartition
The codes I used:
install.packages("caret")
library(caret)
install.packages("stringi")
library(stringi)
The results are below:
**install.packages("caret")**
*Installing package into ‘C:/Users/Anuli/OneDrive - The University of Texas-Rio Grande Valley/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘CARET’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Warning in install.packages :
Perhaps you meant ‘caret’ ?*
**library(caret)**
*Loading required package: ggplot2
Loading required package: lattice
Error: package or namespace load failed for ‘caret’ in library.dynam(lib, package, package.lib):
DLL ‘stringi’ not found: maybe not installed for this architecture?*
**install.packages("stringi")**
*Installing package into ‘C:/Users/Anuli/OneDrive - The University of Texas-Rio Grande Valley/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/stringi_1.7.6.zip'
Content type 'application/zip' length 16449819 bytes (15.7 MB)
downloaded 15.7 MB
package ‘stringi’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot delete reparse point 'C:\Users\Anuli\OneDrive - The University of Texas-Rio Grande Valley\Documents\R\win-library\4.1/stringi/libs/x64', reason 'There is a mismatch between the tag specified in the request and the tag present in the reparse point'
Warning in install.packages :
cannot remove prior installation of package ‘stringi’
Warning in install.packages :
cannot delete reparse point 'C:\Users\Anuli\OneDrive - The University of Texas-Rio Grande Valley\Documents\R\win-library\4.1/stringi/libs/x64', reason 'There is a mismatch between the tag specified in the request and the tag present in the reparse point'
Warning in install.packages :
restored ‘stringi’
The downloaded binary packages are in
C:\Users\Anuli\AppData\Local\Temp\RtmpyqAGs4\downloaded_packages*
**library(stringi)**
*Error: package or namespace load failed for ‘stringi’ in library.dynam(lib, package, package.lib):
DLL ‘stringi’ not found: maybe not installed for this architecture?*
As a result of the stringi not found error, I am unable to split my data:
myData$cyl <- as.factor(myData$cyl)
sapply(myData, is.factor)
mpg cyl disp hp drat wt qsec vs am gear carb
FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
set.seed(1)
index <- createDataPartition(myData$cyl, p=0.75, list=FALSE)
Error in createDataPartition(myData$cyl, p = 0.75, list = FALSE) :
could not find function "createDataPartition"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论