Displaying 1 result from an estimated 1 matches for "poythress".
Did you mean:
postgress
2009 Dec 28
3
apply loop - using/providing a data frame to loop over
...dual 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, Subramanian S, Weiss D,
Poythress ML, Rattanathikun P, Mueller G")
#Since I only want the surname and the initial of the first name, I create
respective indices
starts=c(1, 13, 24, 35, 50, 59, 73, 90)
ends=c(10, 21, 31, 47, 56, 69, 87, 98)
#Now I can extract the names, e.g. the third one, with
substr(authors,start=starts[3],...