How to pivot a single cell dataframe
问题 I have encountered such a simple challenge, and yet don't know how to do this properly. library(tibble) library(dplyr) # I have this single-cell dataframe tibble::tribble(~red, "apple") ## # A tibble: 1 x 1 ## red ## <chr> ## 1 apple But being red is a property of the variable fruit , which apple is one observation of. Therefore, I want my data to look like: # Desired Output: ## # A tibble: 1 x 2 ## fruit red ## <chr> <lgl> ## 1 apple TRUE So I tried a clunky method, which seems not best