因此,我有一个包含几列的数据框,我想创建另一个数据框,该数据框基本上是第一个的小样本。我希望它的大小是原始数据帧大小的10%。 我尝试过:
sample(df,length(df$column1)*0.1)
但返回错误:
Error in sample.int(length(x), size, replace, prob) :
cannot take a sample larger than the population when 'replace = FALSE'
预先感谢您的任何建议