如何在R中的包中找到函数?
R中有很多软件包,并且每个软件包都有不同的目标,因此,这些软件包中的功能数量足以解决分析中的问题。一个包可能具有十五个功能,而另一个可能具有一百个功能,这完全取决于必要性。我们可以使用lsf.str函数在包中找到函数,但是我们需要先加载包,然后才能了解其中的函数。
例1
library(BSDA)lsf.str("package:BSDA")
CIsim : function (samples = 100, n = 30, mu = 0, sigma = 1, conf.level = 0.95,
type = "Mean")
Combinations : function (n, k)
EDA : function (x, trim = 0.05)
normarea : function (lower = -Inf, upper = Inf, m, sig)
nsize : function (b, sigma = NULL, p = 0.5, conf.level = 0.95, type = "mu")
ntester : function (actual.data)
SIGN.test : function (x, y = NULL, md = 0, alternative = "two.sided", conf.level = 0.95,
...)
SRS : function (POPvalues, n)
tsum.test : function (mean.x, s.x = NULL, n.x = NULL, mean.y = NULL, s.y = NULL, n.y = NULL,
alternative = "two.sided", mu = 0, var.equal = FALSE, conf.level = 0.95)
z.test : function (x, y = NULL, alternative = "two.sided", mu = 0, sigma.x = NULL,
sigma.y = NULL, conf.level = 0.95)
zsum.test : function (mean.x, sigma.x = NULL, n.x = NULL, mean.y = NULL, sigma.y = NULL,
n.y = NULL, alternative = "two.sided", mu = 0, conf.level = 0.95)
例2
library(sqldf)lsf.str("package:sqldf")
read.csv.sql : function (file, sql = "select * from file", header = TRUE, sep = ",", row.names,
eol, skip, filter, nrows, field.types, colClasses, dbname = tempfile(),
drv = "SQLite", ...)
read.csv2.sql : function (file, sql = "select * from file", header = TRUE, sep = ";", row.names,
eol, skip, filter, nrows, field.types, colClasses, dbname = tempfile(),
drv = "SQLite", ...)
sqldf : function (x, stringsAsFactors = FALSE, row.names = FALSE, envir = parent.frame(),
method = getOption("sqldf.method"), file.format = list(), dbname, drv = getOption("sqldf.driver"),
user, password = "", host = "localhost", port, dll = getOption("sqldf.dll"),
connection = getOption("sqldf.connection"), verbose = isTRUE(getOption("sqldf.verbose")))
例子3
library(rvest)lsf.str("package:rvest")
%>% : function (lhs, rhs)
back : function (x)
follow_link : function (x, i, css, xpath, ...)
google_form : function (x)
guess_encoding : function (x)
html : function (x, ..., encoding = "")
html_attr : function (x, name, default = NA_character_)
html_attrs : function (x)
html_children : function (x)
html_form : function (x)
html_name : function (x)
html_node : function (x, css, xpath)
html_nodes : function (x, css, xpath)
html_session : function (url, ...)
html_table : function (x, header = NA, trim = TRUE, fill = FALSE, dec = ".")
html_tag : function (x)
html_text : function (x, trim = FALSE)
is.session : function (x)
jump_to : function (x, url, ...)
minimal_html : function (title, html = "")
pluck : function (x, i, type)
repair_encoding : function (x, from = NULL)
session_history : function (x)
set_values : function (form, ...)
submit_form : function (session, form, submit = NULL, ...)
xml : function (x, ..., encoding = "")
xml_node : function (x, css, xpath)
xml_nodes : function (x, css, xpath)
xml_tag : function (x)
以上是 如何在R中的包中找到函数? 的全部内容, 来源链接: utcz.com/z/322471.html