resample.uniform(sperrorest)
resample.uniform()所属R语言包:sperrorest
Draw uniform random (sub)sample
绘制均匀分布的随机(次)样品
译者:生物统计家园网 机器人LoveR
描述----------Description----------
resample.uniform draws a random (sub)sample (with or without replacement) from the samples in data.
resample.uniform绘制一个随机的(分)样品(有或没有替换)从样品中data。
用法----------Usage----------
resample.uniform(data,
param = list(n = Inf, replace = FALSE))
参数----------Arguments----------
参数:data
a data.frame, rows represent samples
data.frame,行代表样本
参数:param
a list with the following components: n is a numeric value specifying the size of the subsample; replace determines if sampling is with or without replacement
以下部分组成:一个列表,n是一个数字值,指定的子样本的大小,“replace确定取样是有或没有更换
Details
详细信息----------Details----------
If param$replace=FALSE, a subsample of size min(param$n,nrow(data)) will be drawn from data. If param$replace=TRUE, the size of the subsample is param$n.
如果param$replace=FALSE,其中一个样本的大小min(param$n,nrow(data))将来自data。如果param$replace=TRUE,子样本的大小是param$n。
值----------Value----------
a data.frame containing a subset of the rows of data.
data.frame包含的一个子集的行data。
参见----------See Also----------
resample.strat.uniform, sample
resample.strat.uniform,sample
实例----------Examples----------
data(ecuador) # Muenchow et al. (2012), see ?ecuador[明肖等。 (2012年),厄瓜多尔,看到了吗?]
d = resample.uniform(ecuador, param = list(strat = "slides", n = 200))
nrow(d) # == 200[== 200]
sum(d$slides == "TRUE")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|