Malter
Cc: r-h...@stat.math.ethz.ch
Subject: Re: [R] apply loop - using/providing a data frame to loop over
Try this. It picks out each string of word characters (\w+) followed
by a space followed by a word character:
> library(gsubfn)
> strapply(authors, "\\w+ \\w", c)[[1]]
Try this:
mapply(substr, x = authors, start = starts, stop = ends)
On Mon, Dec 28, 2009 at 10:46 AM, Daniel Malter wrote:
> Hi,
>
> I want to extract individual names from a single string that contains all
> names. My problem is not the extraction itself, but the looping over the
> extraction st
Try this. It picks out each string of word characters (\w+) followed
by a space followed by a word character:
> library(gsubfn)
> strapply(authors, "\\w+ \\w", c)[[1]]
[1] "Schleyer T" "Spallek H" "Butler B""Subramanian S"
[5] "Weiss D" "Poythress M" "Rattanathikun P
Hi,
I want to extract individual names from a single string that contains all
names. My problem is not the extraction itself, but the looping over the
extraction start and end points, which I try to realize with apply.
#Say, I have a string with names.
authors=c("Schleyer T, Spallek H, Butler BS,
4 matches
Mail list logo