R语言_R中的帮助函数

 往往我们在直接摘抄其他代码的时候会遇到:函数对应的包未引用,继而导致系统提示"找不到对应函数"的情况。我们知道要library("相应的packages”),但是是哪个packages呢?本文就是解决类似的问题。

> SieRet100 <- tail(sort(abs(series(SieRet))),100)[1]
Error in series(SieRet) : could not find function "series"

方法一:help.search("packagename) or ??packagename 

可以查到别名、概念、标题等与我们想要查找的内容匹配的vignettes、demos、help files.

方法二:使用utiles包

library(utiles)
RSiteSearch("...")

方法二:使用sos包

library(sos)
PL <- findFN("...")     ###???是该函数的简单表达方式,返回的PL是data.frame类型。
???series  ###???函数名 的格式进行搜索

使用???查询后返回的结果是两个table格式的链接,第一个是PackageSum2(提供了具有匹配项目的包的相关摘要),第二个是findFN表,具体罗列了相关包中可能满足要求的函数。

PackageSum2,见图一。

findFN返回的data frame包含的列名有Count、Maxscore、TotalScore

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
您好!您的问题是关于R语言的splm包和spml()函数英文对照帮助文档。以下是相关信息: splm包是R语言一个用于空间面板数据分析的包,提供了一系列的函数来进行空间面板数据的模型估计和推断。其,spml()函数是用于估计空间面板数据模型的函数,它可以估计各种不同类型的空间面板数据模型。 以下是spml()函数英文对照帮助文档: 英文文档: spml(formula, data, listw, model, effect = c("individual", "time", "twoways"), method = "ml", spatial.error = c("none", "b", "w", "both"), lag = TRUE, diagnostics = TRUE, control = list(), ...) Arguments: - formula: a symbolic description of the model to be fitted - data: a data.frame containing the variables in the model - listw: a listw object created with nb2listw() or a weights matrix object created with nb2mat() or mat2listw() - model: a character string specifying the model to be estimated - effect: a character string specifying the type of fixed effects to be included - method: a character string specifying the estimation method to be used - spatial.error: a character string specifying the type of spatial error structure to be assumed - lag: a logical value indicating whether a lagged dependent variable should be included in the model - diagnostics: a logical value indicating whether to compute diagnostic tests - control: a list of control parameters - ...: additional arguments 文翻译: spml(公式,数据,listw,模型,效应 = c("个体", "时间", "两种方式"), 方法 = "最大似然", 空间误差 = c("无", "b", "w", "两者"), 滞后 = TRUE, 诊断 = TRUE, 控制 = list(), ...) 参数: - formula:需要拟合的模型的符号描述。 - data:包含模型变量的data.frame。 - listw:使用nb2listw()创建的listw对象或使用nb2mat()或mat2listw()创建的权重矩阵对象。 - model:指定要估计的模型的字符字符串。 - effect:指定要包含的固定效应类型的字符字符串。 - method:指定要使用的估计方法的字符字符串。 - spatial.error:指定要假定的空间误差结构类型的字符字符串。 - lag:一个逻辑值,指示是否应在模型包括滞后的因变量。 - diagnostics:一个逻辑值,指示是否计算诊断测试。 - control:控制参数的列表。 - ...:其他参数。 希望这些信息能够帮助您!

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值