Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为了从数据库表中采样,我经常使用该模式
library(dplyr) tbl(con, 'tableName') %>% mutate(z = random()) %>% compute() %>% arrange(z) %>% filter(row_number() < numSamples) %>% collect()
有没有办法设置种子以便可以复制样本?