similar to: How do you generate multiple sequences

Displaying 20 results from an estimated 30000 matches similar to: "How do you generate multiple sequences"

2005 Jan 07
3
Basic Linear Algebra
I don't normally have to go anywhere near this stuff , but it seems to me that this should be a straight-forward process in R. For the purposes of this enquiry I thought I would use something I can work out on my own. So I have my matrix and the right hand results from that matrix tdata <- matrix(c(0,1,0,-1,-1,2,0,0,-5,-6,0,0,3,-5,-6,1,-1,-1,0,0),byrow = T,ncol = 5) sumtd <-
2009 Jan 09
3
create sequences from two "from" and "to" vectors
hi all, how can I create sequences that start from a known vector, say x1 and end with another say x2- also suppose all the sequences will be the same length. I don't want to use a for loop x1<-c(1,2,3,4); x2<-(3,4,5,6); what I want is 1 2 3 4 2 3 4 5 3 4 5 6 Thanks ----- Yasir H. Kaheil Columbia University -- View this message in context:
2005 Oct 20
1
Windows 2000 crash while using rbind (PR#8225)
Windows 2000 reports that "Rgui.exe has generated errors and will be = closed by Windows. You will need to restart the program." when using = rbind.=20 df1 <- data.frame(cbind(x=3D1, y=3D1:1000), fac=3Dsample(LETTERS[1:3], = 1000, repl=3DTRUE)) df2 <- data.frame(cbind(x=3D1, y=3D1:10), fac=3Dsample(LETTERS[4:6], = 10, repl=3DTRUE)) df3 <- data.frame(cbind(x=3D1,
2003 May 14
2
Is there a simple method of changing text into 'Proper Ca se'
Yes and no. Given your response it appears that "Proper Case" is not a term that everyone uses. In Excel there is a function "Proper" which in essence changes "this line into something like this" into "This Line Into Something Like This." My look at casefold seesm to be that is is a wrapper of two functions to change text into either Lower or Upper case.So
2005 Apr 20
2
fSeries Technical Analysis rsiTA problem
fSeries Technical Analysis rsiTA problem Hello, I?m trying to use the rsiTA() function but keep getting this error: >rsiTA(tsx,14) Error in "[.timeSeries"(close, 1:(length(close) - 1)) : only 0's may be mixed with negative subscripts Here?s is the first three lines of my data: >tsx[1:3,] close 2004-04-18 20:00:00 8702.82 2004-04-19
2003 May 14
1
Is there a simple method of changing text into 'Proper Case'
I am probably just looking in the wrong place. I am sure there are a number of ways to do this. If anyone could point me in the right direction it would be very much appreciated. Thanks _________________________________________________ Tom Mulholland Senior Policy Officer WA Country Health Service 189 Royal St, East Perth, WA, 6004 Tel: (08) 9222 4062 e-mail:
2005 Jan 11
1
Please use colMeans()! was: Re: Calculate Mean of Column Vectors?
There are indeed speed advantages in using colSums etc. However the disadvantage is that the newbie doesn't always find the power inherent in the apply, sapply, tapply and mapply. For many things that I do, the speed is the least of my worries; although I take the point that using apply for means or sums in packages that are distibuted to others is not the way to go. As many of us have found
2003 Jul 17
1
Recode from 2 variables
I am trying to create a new variable which uses the suburb names if HR and HRRES are the same but which uses HRRES if they are different. Any assistance would be appreciated as my brain has just packed up. I'm not sure I can teach myself anymore new tricks this afternoon. HR HRRES SUBURB What I am trying to get 954 Wheatbelt
2003 Jun 04
4
Strip location and grid colour in Lattice
I am probably missing something quite obvious, but any help would be appreciated. I am continually getting people misreading the lattice plots because they are expecting the strip (with the factor names in them) to be below the graph. Is there anyway of achieving this. Secondly, from a more personal note I find the grid formed by the axes to be a bit overpowering and would like to make it a
2005 Jun 28
0
R-help Digest, Vol 28, Issue 28
On Tuesday 28 June 2005 15:30, r-help-request at stat.math.ethz.ch wrote: Re : 37. Re: A. Mani : colours in Silhouette (Mulholland, Tom) > > Message: 37 > Date: Tue, 28 Jun 2005 09:08:24 +0800 > From: "Mulholland, Tom" <Tom.Mulholland at dpi.wa.gov.au> > Subject: Re: [R] A. Mani : colours in Silhouette > To: <a_mani_sc_gs at vsnl.net>, <r-help at
2006 May 19
5
Converting character strings to numeric
I assume that I have missed something fundamental and that it is there in front of me in "An Introduction to R", but I need someone to point me in the right direction. > x1 <- "1159 1129 1124 -5 -0.44 -1.52" > x2 <- c("1159","1129","1124","-5","-0.44","-1.52") > x3 <- unlist(strsplit(x1,"
2008 Feb 23
2
counting sequence mismatches
Hello I have 2 columns of short sequences that I would like to compare and count the number of mismatches and record the number of mismatches in a new column. The sequences are part of a data frame that looks like this: seq1=c("CGGTGTAGAGGAAAAAAAGGAAACAGGAGTTC","CGGTGGTCAGTCTGGGACCTGGGCAGCAGGCT", "CGGGCCTCTCGGCCTGCAGCCCCCAACAGCCA")
2007 Jan 26
2
Why do return or visible don´t return my objekt?
Dear RRRRRrrrrrrrrlist! I?ve got two lists which contain sets of DNA-sequences. They look something like this: List of 33 $ Cunonia_atrorubens : chr [1:247] "t" "t" "n" "t" ... $ Cunonia_balansae : chr [1:254] "t" "c" "c" "c" ... $ Cunonia_capensis : chr
2007 Oct 27
2
How to generate all permutation of 0-1 sequences in R?
Hi, folks: I need to generate all 0-1 sequences with given length,say,n=3, the ideal result would be the following matrix: 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Any help would be appreciated. -- View this message in context: http://www.nabble.com/How-to-generate-all-permutation-of-0-1-sequences-in-R--tf4704377.html#a13446919 Sent from the R help mailing list archive at Nabble.com.
2008 Aug 26
4
sequence with start and stop positions
Hi, I have a vector of start positions, and another vector of stop positions, eg start<-c(1,20,50) stop<-c(7,25,53) Is there a quick way to create a sequence from these vectors? new<-c(1,2,3,4,5,6,7,20,21,22,23,24,25,50,51,52,53) the way Im doing it at the moment is pos<-seq(start[1],stop[1]) for (i in 2:length(start)){ new<-seq(start[i],stop[i]) pos<-c(pos,new) }
2004 Nov 22
4
How to correct this
Hi there, I tried to add a few circles on an existing figure using the following codes grid.circle(x=0.5, y=0.5, r=0.1, draw=TRUE, gp=gpar(col=5)) grid.circle(x=0.5, y=0.5, r=0.3, draw=TRUE, gp=gpar(col=5)) grid.circle(x=0.5, y=0.5, r=0.5, draw=TRUE, gp=gpar(col=5)) points(0.5, 0.5, col = 5) # centre of the circle , but all circles moved away from the centre. Could we do any
2005 Apr 14
3
Wrapping long labels in barplot(2)
I am using barplot, and barplot2 in the gregmisc bundle, in the following way: barplot2(sort(xtabs(expend / 1000 ~ theme)), col = c(mdg7, mdg8, mdg3, mdg1), horiz = T, las = 1, xlab = "$ '000", plot.grid = T) The problem is that the values of 'theme', which is a factor, are in some cases rather long, so that I would like to wrap/split them at a space once they
2003 Dec 03
1
R and Memory
I would suggest that you make a more thorough search of the R-Archives. (http://finzi.psych.upenn.edu/search.html) If you do you will find this discussion has been had several times and that the type of machine you are running will have an impact upon what you can do. My feeling is that you are going have to knuckle down with the documentation and understand how R works and then when you have
2005 Jul 06
1
Help: Mahalanobis distances between 'Species' from iris
Dear R list, I'm trying to calculate Mahalanobis distances for 'Species' of 'iris' data as obtained below: Squared Distance to Species From Species: Setosa Versicolor Virginica Setosa 0 89.86419 179.38471 Versicolor 89.86419 0 17.20107 Virginica 179.38471 17.20107 0 This distances above were obtained with proc
2006 Jul 20
2
Timing benefits of mapply() vs. for loop was: Wrap a loop inside a function
List: Thank you for the replies to my post yesterday. Gabor and Phil also gave useful replies on how to improve the function by relying on mapply rather than the explicit for loop. In general, I try and use the family of apply functions rather than the looping constructs such as for, while etc as a matter of practice. However, it seems the mapply function in this case is slower (in terms of CPU