How to create an example (anonymous) R script to provide a reproducible example?

This is related to:
How to create example data set from private data (replacing variable names and levels with uninformative place holders)?
Which stems from :
How to make a great R reproducible example?

I have come to realize that having an anonymous data set (were the data and labels are uninformative but consistent with the original data) is half the battle of producing a reproducible example (for questions or bug reporting) from script and data you can not share (eg. proprietary information, unpublished findings, etc.).

Any suggestions as how to automate the translation of a script so that it matches the variables in the anonymous data frame created using one of the answers provided at this stackoverflow answer

This may be more of a challenge than it is worth, but if it went into widespread use (say as a package), it could reduce the occurrence of questions and bug reports that do not have a reproducible example.

链接地址: http://www.djcxy.com/p/24784.html

上一篇: 使用$和列名称向量动态选择数据框列

下一篇: 如何创建一个示例(匿名)R脚本来提供可重现的示例?