Thank you so much!
On Fri, Apr 10, 2020 at 12:00 PM Rasmus Liland wrote:
>
> On 2020-04-10 11:15 -0500, Ana Marija wrote:
> > I have a data frame (tot) with about
> > 2000 columns. How can I extract from
> > it all strings that start with E14?
> >
> > I tried this:
> > e14 <- sapply(tot, function
On 2020-04-10 11:15 -0500, Ana Marija wrote:
> I have a data frame (tot) with about
> 2000 columns. How can I extract from
> it all strings that start with E14?
>
> I tried this:
> e14 <- sapply(tot, function(x) grepl("^E14", x))
>
> but this returns me just TRUE and
> FALSE vector, how do I g
Dear Ana
Would it not be possible to use grep instead of grepl and get the values
using the value = TRUE parameter?
Michael
On 10/04/2020 17:15, Ana Marija wrote:
Hello,
Hello,
I have a data frame (tot) with about 2000 columns. How can I extract
from it all strings that start with E14?
I
Hello,
Hello,
I have a data frame (tot) with about 2000 columns. How can I extract
from it all strings that start with E14?
I tried this:
e14 <- sapply(tot, function(x) grepl("^E14", x))
but this returns me just TRUE and FALSE vector, how do I get actual
strings that start with E14?
Thanks
Ana
4 matches
Mail list logo