SendmailR 附上pdf
我正在使用 sendmailR 包并尝试将 data.frame 附加到邮件。 data.frame 相当大,因此附加它的最佳方式是 pdf,.txt 文件会扭曲表格,导致内容难以阅读。
有没有办法附加pdf,我尝试了plot.table,但是我无法附加这个图。
有什么想法吗?非常感谢!
I'm working with the sendmailR package and trying to attach a data.frame to the mail. The data.frame is rather large so the best way to attach it would be a pdf, a .txt file distorts the table so that the content is rather unread able.
Is there a way of attaching a pdf, i tried plot.table but, I can't attach this plot.
Any ideas? Thank you very much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不同意最好的方法是pdf。它最终会比它需要的大得多。请改为使用 dump 或 dput 创建 ASCII 文本表示形式并将其保存到您附加的 .txt 文件中。
mime_part
{sendmailR} 用于构造附件。您还可以使用 mime_part.data.frame 并绕过构建 dump()-ed 或 dput()-ted 步骤。您可以在这里找到一个有效的示例: http://www.inside-r.org/node/95009
如果您想检查附加 pdf 文件的代码,请查看
mime_part.trellis
{sendmailR},它从 a 发送 pdfprint
-ed()网格/格子对象。I disagree that the best way would be a pdf. It will end up much bigger than it needs to be. Instead use dump or dput to create an ASCII text representation and save that to a .txt file that you attach. The
mime_part
{sendmailR} is used to construct attachments. You could also use mime_part.data.frame and bypass constructing the dump()-ed or dput()-ted steps.You can find a worked example here: http://www.inside-r.org/node/95009
If you want to examine code that attaches a pdf file then look at
mime_part.trellis
{sendmailR} which send a pdfprint
-ed() from a trellis/lattice object.