I have the following data frame:
library(tidyverse) dat <- structure(list(seq_name = c("Peptide_set1.r1", "Peptide_set2.r1" ), peptide = c("KSKLRHGC", "AAYVYVNQF" )), .Names = c("seq_name", "peptide"), row.names = c(NA, -2L), class = c("tbl_df", "tbl", "data.frame")) dat #> # A tibble: 2 x 2 #> seq_name peptide #> <chr> <chr> #> 1 Peptide_set1.r1 KSKLRHGC #> 2 Peptide_set2.r1 AAYVYVNQF What I want to do is to convert them into this list of vector:
$Peptide_set1.r1 [1] "K" "S" "K" "L" "R" "H" "G" "C" $Peptide_set2.r1 [[1] "A" "A" "Y" "V" "Y" "V" "N" "Q" "F" How can I do that?