Copy a Dataframe to Clipboard
copy_cb(data, log = "DEPRECATED", log_details = "")
data | A dataframe or tibble. |
---|---|
log | (Deprecated) Log this function call to a log.md file? |
log_details | (Deprecated) If log is TRUE, additional notes to include with the log entry. |
Other clipboard functions:
copy_to_clipboard()
,
read_cb_hl()
,
read_cb_trbl()
,
read_cb()
,
read_clipboard()
#>#> ✓ ggplot2 3.3.3 ✓ purrr 0.3.4 #> ✓ tibble 3.1.0 ✓ dplyr 1.0.5 #> ✓ tidyr 1.1.2 ✓ stringr 1.4.0 #> ✓ readr 1.4.0 ✓ forcats 0.5.0#> ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ── #> x dplyr::filter() masks stats::filter() #> x dplyr::lag() masks stats::lag()# Test Data test_data <- tibble(A = 1:3, B = c("Apples", "Bananas", "Oranges"), C = factor(c("Apples", "Bananas", "Oranges")), D = runif(3)) # Copy to Clipboard copy_cb(data = test_data) # Read Clipboard read_cb()#> A B C D #> 1 1 Apples Apples 0.08075014 #> 2 2 Bananas Bananas 0.83433304 #> 3 3 Oranges Oranges 0.60076089#> A B C D #> "integer" "character" "factor" "numeric"sapply(read_cb(), FUN = class) # `read_cb()` function mutates all factors to character before returning#> A B C D #> "integer" "character" "character" "numeric"#> V1 V2 V3 V4 #> 1 A B C D #> 2 1 Apples Apples 0.0807501375675201 #> 3 2 Bananas Bananas 0.834333037259057 #> 4 3 Oranges Oranges 0.600760886212811#> tibble::tribble(, #> ~A,~B,~C,~D, #> 1, "Apples", "Apples", 0.0807501375675201, #> 2, "Bananas", "Bananas", 0.834333037259057, #> 3, "Oranges", "Oranges", 0.600760886212811, #> )#> tibble::tribble(, #> ~V1,~V2,~V3,~V4, #> "A", "B", "C", "D", #> "1", "Apples", "Apples", "0.0807501375675201", #> "2", "Bananas", "Bananas", "0.834333037259057", #> "3", "Oranges", "Oranges", "0.600760886212811", #> )#> tibble::tribble(, #> ~A,~B,~C,~D, #> 1, 'Apples', 'Apples', 0.0807501375675201, #> 2, 'Bananas', 'Bananas', 0.834333037259057, #> 3, 'Oranges', 'Oranges', 0.600760886212811, #> )#> tibble::tribble(, #> ~V1,~V2,~V3,~V4, #> 'A', 'B', 'C', 'D', #> '1', 'Apples', 'Apples', '0.0807501375675201', #> '2', 'Bananas', 'Bananas', '0.834333037259057', #> '3', 'Oranges', 'Oranges', '0.600760886212811', #> )