Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- df<- structure(list(A = structure(c(7L, 6L, 5L, 4L, 3L, 2L, 1L, 1L,
- 1L), .Label = c("", "P42356;Q8N8J0;A4QPH2", "P67809;Q9Y2T7",
- "Q08554", "Q13835", "Q5T749", "Q9NZT1"), class = "factor"), B = structure(c(9L,
- 8L, 7L, 6L, 5L, 4L, 3L, 2L, 1L), .Label = c("P62861", "P62906",
- "P62979;P0CG47;P0CG48", "P63241;Q6IS14", "Q02413", "Q07955",
- "Q08554", "Q5T749", "Q9UQ80"), class = "factor"), C = structure(c(9L,
- 8L, 7L, 6L, 5L, 4L, 3L, 2L, 1L), .Label = c("", "P62807;O60814;P57053;Q99879;Q99877;Q93079;Q5QNW6;P58876",
- "P63241;Q6IS14", "Q02413", "Q16658", "Q5T750", "Q6P1N9", "Q99497",
- "Q9UQ80"), class = "factor")), .Names = c("A", "B", "C"), class = "data.frame", row.names = c(NA,
- -9L))
- sapply(df,function(x) length(unlist(sapply(strsplit(as.character(x),"\s+"),strsplit,split=";"))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement