[R] gsub for numeric characters in string

2011-08-19 Thread Rebecca Gray
Dear all, I have what is a bit of a confusing question, so I hope that I can explain clearly. Thank you for your help in advance. I would like to do a replacement procedure on several strings, but the way that I am currently going about it is not working. I have defined "len", which is a series

Re: [R] gsub wildcard

2011-08-15 Thread Rebecca Gray
d there are many more "[" that are unaffected. Rebecca On Mon, Aug 15, 2011 at 6:40 PM, Peter Langfelder < peter.langfel...@gmail.com> wrote: > On Mon, Aug 15, 2011 at 10:34 AM, Rebecca Gray wrote: > > Hello all, > > > > I have what I think is a simple qu

[R] gsub wildcard

2011-08-15 Thread Rebecca Gray
Hello all, I have what I think is a simple question but I've been unable to solve it. I have the following string: A[&states=1]:[&rate=2]425, B[&states=3]:[&rate=5]500 I would like to combine the two expressions in the [], so that only one set of [] is present after each letter, so that I have t

[R] plotting the ending point in a for loop

2011-07-27 Thread Rebecca Gray
Hello, I would appreciate if someone could help me with this query. I would like to plot a line chart of all of the points in a "for" loop. I would also like to plot the final point with a symbol (to show where the random walk ends). Here is the code I am using: Brownian.fn <- function(mu, sigma