splt_dat | R Documentation |
Split the character to data.frame
splt_dat(x, splt, lab)
x |
vector |
splt |
character. as an argument of 'split' for 'strsplit' |
lab |
logical. |
## Not run: # examples x <- paste(LETTERS[1:5], letters[1:5], 1:5, sep="_") splt_dat(x,"_", c("x","y","z")) # A list have different length of splitted elements x1 <- c("xxx;yyy", "xyx", "xxy;yyx;xxz") x2 <- setNames(x1, letters[1:3]) splt_dat(x1, ";") splt_dat(x2, ";") splt_dat(x2, ";", c("v","idx")) # A Named lists have different lengths for split elements. equas <- rskodat::react_equas_ko x <- equas$KOids[1:10] %>% setNames(., equas$Rid[1:10]) res <- splt_dat(x, ";", c("Kid", "Rid")) split(res, res$Rid) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.