Re: [R] How use lapply over one column in a dataframe?

2010-04-26 Thread Robert Nicholson
Yeah I finally got there thanks. On Apr 26, 2010, at 8:22 AM, Henrique Dallazuanna wrote: > Try this: > > Transactions$Symbol <- gsub('[ -]*','INST',Transactions$Symbol) > > > On Mon, Apr 26, 2010 at 10:14 AM, Robert Nicholson > wrote:

[R] How use lapply over one column in a dataframe?

2010-04-26 Thread Robert Nicholson
So I have Transactions as a dataframe and Transactions$Symbol is a column in the frame I simply want to run sub over all elements in that column where the new value replaces the old value this doesn't seem to work Transactions$Symbol = lapply(Transactions$Symbol, function(x) sub('[ -]*','INST