str_data(sfsmisc)
str_data()所属R语言包:sfsmisc
Overview on All Datasets in an R Package
R封装上的所有数据集概述
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Provide an overview over all datasets available by data() in a (list of) given R packages.
提供一个概述,所有的数据资料data()(名单)在给定的R套件。
用法----------Usage----------
str_data(pkgs, filterFUN, ...)
参数----------Arguments----------
参数:pkgs
character vector of names of R packages.
字符向量的R包的名称。
参数:filterFUN
optionally a logical function for filtering the R objects.
可选的logicalfunction用于过滤的R对象。
参数:...
potentical further arguments to be passed to str; str(utils:::str.default) gives useful list.
potentical进一步的参数被传递到strstr(utils:::str.default)提供了有用的列表。
值----------Value----------
invisibly (see invisible) a list with named components matching the pkgs argument. Each of these components is a named list with one entry per data(.) argument name. Each entry is a character vector of the names of all objects, typically only one.
不可见的(见invisible)list命名的组件pkgs参数匹配。这些组件中的每一个都与每一个条目data(.)参数名称是命名列表。每个条目是一个character矢量的所有对象的名称,通常只有一个。
The side effect is, as with str(), to print everything (via cat) to the console.
副作用是,与str(),打印所有的控制台(通过cat)。
(作者)----------Author(s)----------
Martin Maechler
参见----------See Also----------
str, data.
str,data。
实例----------Examples----------
str_data("cluster")
str_data("datasets", max=0, give.attr = FALSE)
## Filtering (and return value)[#过滤(返回值)]
dfl <- str_data("datasets", filterFUN=is.data.frame)
df.d <- dfl$datasets
## work around bug in R < 2.14.1 (?) {for *some* setups only}:[#解决错误在R <2.14.1(?){*一些*设置}]
str(df.d <- df.d[sapply(df.d, is.character)])
## dim() of all those data frames:[#DIM()的所有数据框:]
t(sapply(unlist(df.d), function(.) dim(get(.))))
### Data sets in all attached packages but "datasets" (and stubs):[##的数据集,所有的附加软件包,但“数据集”(存根):]
s <- search()
(Apkgs <- sub("^package:", '', s[grep("^package:", s)]))
str_data(Apkgs[!Apkgs %in% c("datasets", "stats", "base")])
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|