Read headerless data from the clipboard. Shortcut for `read_clipboard(header = FALSE)`. To read data with a header from the clipboard, use read_cp
.
read_cb_hl()
Dataframe is returned with all the rows and column names in the pattern "Vindex," where "index" is the position of the column.
Other clipboard functions:
copy_cb()
,
copy_to_clipboard()
,
read_cb_trbl()
,
read_cb()
,
read_clipboard()
library(tidyverse) # 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.4977774 #> 2 2 Bananas Bananas 0.2897672 #> 3 3 Oranges Oranges 0.7328820#> 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"# Read Clipboard Shortcut for Headerless Data read_cb_hl()#> V1 V2 V3 V4 #> 1 A B C D #> 2 1 Apples Apples 0.497777388663962 #> 3 2 Bananas Bananas 0.289767244597897 #> 4 3 Oranges Oranges 0.732881987001747#> tibble::tribble(, #> ~A,~B,~C,~D, #> 1, "Apples", "Apples", 0.497777388663962, #> 2, "Bananas", "Bananas", 0.289767244597897, #> 3, "Oranges", "Oranges", 0.732881987001747, #> )#> tibble::tribble(, #> ~V1,~V2,~V3,~V4, #> "A", "B", "C", "D", #> "1", "Apples", "Apples", "0.497777388663962", #> "2", "Bananas", "Bananas", "0.289767244597897", #> "3", "Oranges", "Oranges", "0.732881987001747", #> )#> tibble::tribble(, #> ~A,~B,~C,~D, #> 1, 'Apples', 'Apples', 0.497777388663962, #> 2, 'Bananas', 'Bananas', 0.289767244597897, #> 3, 'Oranges', 'Oranges', 0.732881987001747, #> )#> tibble::tribble(, #> ~V1,~V2,~V3,~V4, #> 'A', 'B', 'C', 'D', #> '1', 'Apples', 'Apples', '0.497777388663962', #> '2', 'Bananas', 'Bananas', '0.289767244597897', #> '3', 'Oranges', 'Oranges', '0.732881987001747', #> )