copy_tbl: Copy/Paste data out of/into R

Description Usage Arguments References Examples

Description

Using the clipboard, or passing data quickly from Excel to R and back again.

Usage

1
2
3
copy_tbl(obj, size = 4096)

paste_tbl(header = TRUE)

Arguments

obj

object to copy

size

size of memory

References

Using the Windows Clipboard, or Passing Data Quickly From Excel to R and Back Again

http://www.r-bloggers.com/using-the-windows-clipboard-or-passing-data-quickly-from-excel-to-r-and-back-again/

http://stackoverflow.com/questions/9035674/r-function-to-copy-to-clipboard-on-mac-osx

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# These all work
copy_tbl(1:100)
copy_tbl(letters)
copy_tbl(iris)
copy_tbl(table(iris$Species))
copy_tbl(matrix(1:20, nrow = 2))

## Not run: 
# If my.df is of moderate size
copy_tbl(my.df)

# If my.df is huge
copy_tbl(my.df, 10000)

# Pasting works in a similar way. Select the range in Excel you want to copy
# (including the header) and press Ctrl+C. Then run

other.df <- paste_tbl()

## End(Not run)

leoluyi/EOLembrainToolbox documentation built on May 21, 2019, 5:08 a.m.