Re: [R] Help with creating some loops

2009-10-30 Thread Vadlamani, Satish {FLNA}
Hi: In general, how to I cast a character to the class that I am trying to change. For example, if I have a data frame df1. df1 has a column x. suppose I want to a substring of x (the first 3 chars). Then I want to do something like df1$new = substring(of x) Example Data frame df1 x abcd efgh

Re: [R] Help with creating some loops

2009-10-30 Thread David Winsemius
On Oct 30, 2009, at 11:24 AM, Vadlamani, Satish {FLNA} wrote: Hi: In general, how to I cast a character to the class that I am trying to change. For example, if I have a data frame df1. df1 has a column x. suppose I want to a substring of x (the first 3 chars). Then I want to do