search for: myseqs

Displaying 12 results from an estimated 12 matches for "myseqs".

Did you mean: myseq
2005 Jul 22
1
sequence()
Hi Function sequence() repeatedly concatenates its output, and this is slow. It is possible to improve on the performance of sequence by defining myseq <- function(x){unlist(sapply(x,function(i){1:i}))} The following session compares the performance of myseq(), and sequence(), at least on my G5: > identical(sequence(1:50),myseq(1:50)) [1] TRUE > system.time(ignore <-
2005 Jul 22
1
sequence()
Hi Function sequence() repeatedly concatenates its output, and this is slow. It is possible to improve on the performance of sequence by defining myseq <- function(x){unlist(sapply(x,function(i){1:i}))} The following session compares the performance of myseq(), and sequence(), at least on my G5: > identical(sequence(1:50),myseq(1:50)) [1] TRUE > system.time(ignore <-
2006 Nov 15
3
how to get empty sequence for certain bounds
Hi, I have encountered this problem quite a few times and thought I would ask. Let's say that I have two endpoints, a and b, which are integers. If a <= b, I would like to get a:b, but if a > b, then numeric(0), for example: myseq(3,5) => 3:5 myseq(3,3) => 3 myseq(3,2) => numeric(0) The operator : just gives decreasing sequences in the latter case, and I could not coax seq
2003 Sep 08
2
Re: clustering polypeptide sequences
...000000 b0002 0.035122 0.065854 b0003 0.024193 0.070968 b0004 -0.096729 0.084112 b0005 -0.973469 0.091837 b0006 -0.402713 0.108527 b0007 0.680672 0.123950 b0008 -0.209779 0.072555 b0009 -0.013334 0.046154 b0010 0.952128 0.143617 suppose you have these data into a data frame called myseqs [see the R documentation in how to upload these data, you can try > myseqs <- edit(read.table()) ] # you need to load the necessary libraries library(mva) # basic clustering library(cluster) # more clustering algorithms # then you need to calculate the 'distances' betwe...
2005 Nov 17
1
Predicting and Plotting "hypothetical" values of factors
Last Friday, I noticed that it is difficult to work with regression models in which there are factors. It is easier to do the old fashioned thing of coding up "dummy" variables with 0-1 values. The predict function's newdata argument is not suited to insertion of hypothetical values for the factor, whereas it has no trouble with numeric variables. For example, if one uses a
2010 Jun 23
5
Plotrix Trick
Dear All, I am using the plotrix library to plot some matrices. I have a problem: some of my data are outliers, hence using a linear color scale does not work very well (you would see too many cells having a similar, indistinguishable color). See the code snipped at the end of the email. Plotting the logarithm of the data gets the job done, but my problem is that I would like to write in every
2008 Dec 09
2
motif search
Hi, I am very new to R and wanted to know if there is a package that, given very long nucleotide sequences, searches and identifies short (7-10nt) motifs.. I would like to look for enrichment of certain motifs in genomic sequences. I tried using MEME (not an R package, I know), but the online version only allows sequences up to MAX 60000 nucleotides, and that's too short for my needs..
2008 Jan 07
3
Seeking a more efficient way to find partition maxima
Hi. Suppose I have a vector that I partition into disjoint, contiguous subvectors. For example, let v = c(1,4,2,6,7,5), partition it into three subvectors, v1 = v[1:3], v2 = v[4], v3 = v[5:6]. I want to find the maximum element of each subvector. In this example, max(v1) is 4, max(v2) is 6, max(v3) is 7. If I knew that the successive subvector maxima would never decrease, as in the example,
2007 Nov 26
1
visualizing nucleotide sequence properties
Hi there, I am looking for R-packages that can help me visualize properties on nucleotide sequences. I want to display sequences in the 1-100K base range as lines and plot features above and below those lines. Any ideas would be welcome. Thanks, Bernd [[alternative HTML version deleted]]
2005 Dec 10
2
append
Dear R users: > append(1:5, 0:1, after=2) [1] 1 2 0 1 3 4 5 If I want to repeat the appended value every 2 like the following: [1] 1 2 0 1 3 4 0 1 5 How should I modify? Thank you for any help.
2004 Feb 22
3
Simulation help
I am a new R user. As a test, I want to write a simple code that does the following simulation: 1. Randomly generate a number from a distribution, say, Poisson. Let's say that number is 3. 2. Randomly generate 3 numbers from another distribution, say, Normal. 3. Compute the sum of the numbers generated in step 2 and read it into a vector, V. 4. Repeat steps 1 through 3 for 100,000 times. 5.
2006 Mar 21
7
Nuube Sequence problem
In my database the id for a field is 810. RoR thinks that it is 809. My log file (below) shows that just before the insert it grabs the next sequence value. I dont think it should do that. This causes problems further down the line when trying to access the Person object. Development Log file : "SQL (0.016000) select people_seq.nextval id from dual Person Create (0.015000) INSERT