search for: vecter

Displaying 5 results from an estimated 5 matches for "vecter".

Did you mean: vecteur
2017 Dec 13
4
Add vectors of unequal length without recycling?
...following vectors u and v have different lengths, and their sum is computed by recycling values of the shorter vector u. > u = c(10, 20, 30) > v = c(1, 2, 3, 4, 5, 6, 7, 8, 9) > u + v [1] 11 22 33 14 25 36 17 28 39 """""" And I wondered, why the shorter vecter u should be recycled? Why not just leave the extra values(4,5,6,7,8,9) in the longer vector untouched by default? Otherwise is it better to have another function that could add vectors without recycling? Right now the recycling feature bugs me a lot. Sent with [ProtonMail](https://protonmail.com)...
2006 Nov 29
1
Extract some character from a character vector of length 1
the content of th character vector (of length 1) is as follows: a <- "something2 ....pat1 name1 pat2 something2....pat1 name2 pat2....pat1 name3 pat2 " I would like to extract the character bewteen pat1 and pat2. That's to say, I would like to get a vecter of c("name1", "name2","name3"). What I did is use strsplit() twise. But I wonder if there any function to this specific task? Thanks.
2017 Dec 13
0
Add vectors of unequal length without recycling?
...r sum is computed by recycling values of > the shorter vector u. > > > u = c(10, 20, 30) > > > v = c(1, 2, 3, 4, 5, 6, 7, 8, 9) > > > u + v > > [1] 11 22 33 14 25 36 17 28 39 > > """""" > > And I wondered, why the shorter vecter u should be recycled? Why not just > leave the extra values(4,5,6,7,8,9) in the longer vector untouched by > default? > > Otherwise is it better to have another function that could add vectors > without recycling? Right now the recycling feature bugs me a lot. > > Sent with [Pr...
2010 May 26
5
counts of a vector
Hi, I need help to find an efficient way to transform a vector like: a<-c(1,1,0,1,0,0,0,1,1,1,1,0,1,0,1,1) in a vector that counts only di 1 elements, like: b<-c(1,2,0,1,0,0,0,1,2,3,4,0,1,0,1,2) Thank you! -- View this message in context: http://r.789695.n4.nabble.com/counts-of-a-vector-tp2232047p2232047.html Sent from the R help mailing list archive at Nabble.com.
2008 Jun 23
3
Simulating Gaussian Mixture Models
Hi, Is there any package that I can use to simulate the Gaussian Mixture Model , which is a mixture modeling method that is widely used in statistical learning theory. I know there is a mclust, however, I think it is a little bit different from my problem. Thanks very much.. regards. -------------------------- Peng Jiang ?? Ph.D. Candidate Antai College of Economics &