Displaying 2 results from an estimated 2 matches for "mimat0000062".
2010 May 27
3
how to extract the 1st field from a vector of strings
I have the following vector of strings (shown only the first 3 elements)
> desc[1:3]
[1] "hsa-let-7a MIMAT0000062 Homo sapiens let-7a"
[2] "hsa-let-7a* MIMAT0004481 Homo sapiens let-7a*"
[3] "hsa-let-7a-2* MIMAT0010195 Homo sapiens let-7a-2*"
> is.vector(desc)
[1] TRUE
> A <- unlist(strsplit(desc[1:3], " "))
> A
[1] "hsa-let-7a MIMAT0000062 Homo s...
2009 Sep 29
4
How can I avoid a for-loop through sapply or lapply ?
Through converting a miRNAs file from FASTA to character format I get a vector which looks like the following:
> nml
[1] "hsa-let-7a MIMAT0000062 Homo sapiens let-7a"
[2] "hsa-let-7b MIMAT0000063 Homo sapiens let-7b"
[3] "hsa-let-7c MIMAT0000064 Homo sapiens let-7c"
[4] "hsa-let-7d MIMAT0000065 Homo sapiens let-7d"
[5] "hsa-let-7e MIMAT0000066 Hom...