strsplit.to.rows: Split strings to rows with matching ids

Description Usage Arguments Value

Description

A convenience function. Mainly designed for preparing data for co-author type networks, if an unknown number of authors per document is stored as a single character string with delimiters. A character string is split by a given character vector. For each part of the string a new row is created. An id value indicates which parts belong together. An order value indicates which part of the original string the stringpart was

Usage

1
strsplit.to.rows(x, id = NULL, split_by = ";", ...)

Arguments

x

A character vector.

split_by

The character vector by which x will be split. By default should be a regular expression (see strsplit) but can be changed using the ellipsis parameters

id

The id to be assigned to the rows. If a vector of the same lengt of x is given, these values will be used.

...

additional parameters to be passed to the strsplit function

Value

A data.frame with the columns id, order and substring


kasperwelbers/network-tools documentation built on May 20, 2019, 7:38 a.m.