Re: [R] Question On Regex and DataFrame

2016-02-21 Thread Jim Lemon
Hi kalyan, It is a bit difficult to work out what you want to do. However, there are some things I can suggest. The gsub function is useful for changing strings not assigning new values. If you want to delete a column of a data frame if there are any NA values, you first want to check for NA values

Re: [R] Question On Regex and DataFrame

2016-02-21 Thread Bert Gunter
Inline beow. On Sunday, February 21, 2016, kalyan chakravarty < kalyanchakravarty...@gmail.com> wrote: > Hi, > I am new to R and learning the basics.so i came to know that data frame can > store any data type as oppose to matrix which stores only numeric.My > question is False. You need to spen

[R] Question On Regex and DataFrame

2016-02-21 Thread kalyan chakravarty
Hi, I am new to R and learning the basics.so i came to know that data frame can store any data type as oppose to matrix which stores only numeric.My question is 1.)How to replace a particular pattern with new pattern in data frame.I tried something like x = as.data.frame(gsub(".*LINK.*","NA",file))