Skip to content
Prev 154372 / 398500 Next

problems formating scientific collaboration data

Hi,

name of the data.frame is assumed to be dt.

cnt.tmp <- strsplit(dt$Author, " ")
cnt <- sapply(cnt.tmp, length)
paper.cnt <- dt$Paper[cnt]
author <- unlist(cnt.tmp)
year <- dt$Year[cnt]

dt.new <- data.frame(Paper = paper.cnt, Author = author, Year = year)

HTH,
Dong-hyun Oh
On Aug 27, 2008, at 9:27 PM, Grant Gillis wrote: