Lopez, Dan
2013-Feb-12 22:51 UTC
[R] Write a dataframe or table to clipboard as an image to paste into an email
Hi, Is there a way to write a dataframe or table to the clipboard as an image? I want to paste into an email. I use snagit or print screen to do this today but want to know if there is a way to do this through R. For example I know how to write to clipboard for copy and pasting into Excel:> write.table(df,"clipboard",sep="\t"But what's the equivalent for .png or other image format? I can't seem to find it in the help file. Note: I also tried using png()...print(df)...device.off() which I normally use for plots but doesn't seem to work for dataframes and tables Dan [[alternative HTML version deleted]]
David Winsemius
2013-Feb-12 22:57 UTC
[R] Write a dataframe or table to clipboard as an image to paste into an email
On Feb 12, 2013, at 2:51 PM, Lopez, Dan wrote:> Hi, > > Is there a way to write a dataframe or table to the clipboard as an image? I want to paste into an email. I use snagit or print screen to do this today but want to know if there is a way to do this through R. > > For example I know how to write to clipboard for copy and pasting into Excel: >> write.table(df,"clipboard",sep="\t" > > But what's the equivalent for .png or other image format? I can't seem to find it in the help file. > > Note: I also tried using png()...print(df)...device.off() which I normally use for plots but doesn't seem to work for dataframes and tablesThe latex function in Hmisc will produce dvi output that can be then samed as pdf. -- David Winsemius Alameda, CA, USA