加载库 R 后找不到函数

问题描述

我在使用 R 中的 startsWith 函数时遇到了一些问题。

更新包含该函数的库 gdata 后,此测试脚本出现错误

library(data.table)
library(gdata)

help.search("startsWith");

print(startsWith("test","t"));

我也尝试使用 gdata::startsWith("test","t")gdata:::startsWith("test","t") 但什么都没有改变。

我得到的错误如下:

Error in get(name,envir = ns,inherits = FALSE) : 
  oggetto "startsWith" non trovato
Calls: print -> <Anonymous> -> :: -> getExportedValue -> get

搜索部分找到函数startsWith时,返回此消息:

gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED.

gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED.

Attaching package: ‘gdata’

The following objects are masked from ‘package:data.table’:

    first,last

The following object is masked from ‘package:stats’:

    nobs

The following object is masked from ‘package:utils’:

    object.size

Help files with alias or concept or title matching ‘startsWith’ using
fuzzy matching:


dplyr::reexports        Objects exported from other packages
  Aliases: starts_with
gdata::startsWith       Determine if a character string "starts with"
                        with the specified characters.
  Aliases: startsWith
tidyselect::select_helpers
                        Select helpers
  Aliases: starts_with


Type '?PKG::FOO' to inspect entries 'PKG::FOO',or 'TYPE?PKG::FOO' for
entries like 'PKG::FOO-TYPE'.

您对如何解决这个问题有什么建议吗? (我已经尝试删除并再次安装该库)。

提前致谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)