how to get the first hit in each sequence from vmatchPattern results
1
0
Entering edit mode
@herve-pages-1542
Last seen 2 days ago
Seattle, WA, United States
On 11/02/2012 11:38 AM, wang peter wrote: > thank u for your advice > i really donot know how to pick up the first element > > i only know > sapply(x,unlist) > This is the only way you know how to use sapply? So I wonder who wrote this code you sent the other day? https://stat.ethz.ch/pipermail/bioconductor/2012-October/048914.html It's using sapply in a way that is much more elaborated than sapply(x,unlist). I sent you my advice to do some homework at 11:27am, and at 11:38am you come back saying that sapply(x,unlist) is the only thing you know. Sorry but I'm afraid you'll need to do more than 11 minutes of homework in order to have a chance to make any progress *by yourself*. Cheers, H. -- Hervé Pagès Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M1-B514 P.O. Box 19024 Seattle, WA 98109-1024 E-mail: hpages at fhcrc.org Phone: (206) 667-5791 Fax: (206) 667-1319
Cancer Cancer • 755 views
ADD COMMENT
0
Entering edit mode
wang peter ★ 2.0k
@wang-peter-4647
Last seen 10.2 years ago
thank u very much you really helped me a lot. but those coding is from another people. now i imiate those coding,wirte such coding but it cannot work match_positions <- sapply(1:length(match_positions), function(j) {unlist(match_positions(j))[1]});
ADD COMMENT
0
Entering edit mode
sorry match_positions <- sapply(1:length(match_positions), function(j) {unlist(match_positions[j])[1]}); it works thank u very much shan
ADD REPLY

Login before adding your answer.

Traffic: 605 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6