View source: R/interactive_programming.R
| clippy | R Documentation | 
Tested on Windows.
clippy(x = NULL)
x | 
 (An expression, vector, dataframe, or   | 
Invisibly returns the contents of the clipboard. If .Last.value is displayed
in RStudio's 'Environment' tab, you'll see its value change.
Desi Quintans (http://www.desiquintans.com)
Darwin PC (https://stackoverflow.com/users/2543306)
dracodoc (https://gist.github.com/dracodoc)
clippy(mtcars)
# Clipboard contents:
# mpg  cyl disp  hp   drat  wt     qsec   vs  am  gear  carb
# 21   6   160   110  3.9   2.62   16.46  0   1   4     4
# 21   6   160   110  3.9   2.875  17.02  0   1   4     4
# ...
clippy(iris$Petal.Length)
# Clipboard contents:
# 1.4
# 1.4
# 1.3
# ...
clippy(colnames(iris))
# Clipboard contents:
# Sepal.Length
# Sepal.Width
# Petal.Length
# Petal.Width
# Species
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.