问题:
When discussing performance with colleagues, teaching, sending a bug report or searching for guidance on mailing lists and here on Stack Overflow, a reproducible example is often asked and always helpful. 与同事讨论性能,教学,发送错误报告或在邮件列表以及堆栈溢出此处寻求指导时,经常会问到一个可重复的示例,并且总是很有帮助。
What are your tips for creating an excellent example? 您建立出色范例的秘诀是什么? How do you paste data structures from r in a text format? 如何以文本格式粘贴r中的数据结构? What other information should you include? 您还应该包括哪些其他信息?
Are there other tricks in addition to using dput()
, dump()
or structure()
? 除了使用dput()
, dump()
或structure()
之外,还有其他技巧吗? When should you include library()
or require()
statements? 什么时候应该包含library()
或require()
语句? Which reserved words should one avoid, in addition to c
, df
, data
, etc.? 除了c
, df
, data
等之外,还应避免使用哪些保留字?
How does one make a great r reproducible example? 怎样才能成为一位伟大的[R重复的例子?
解决方案:
参考一: https://stackoom.com/question/P1Jl/如何制作出色的R可重现示例参考二: https://oldbug.net/q/P1Jl/How-to-make-a-great-R-reproducible-example
来源:oschina
链接:https://my.oschina.net/stackoom/blog/4297120