property_strings_to_data_frame: key1:value1+key2:value2 Strings to Data Frame

View source: R/extract_properties.R

property_strings_to_data_frameR Documentation

key1:value1+key2:value2 Strings to Data Frame

Description

This function needs some improvement! The argument is called "values" but the values will appear in column "name". Also, what happens if there is also a property with name "name"?

Usage

property_strings_to_data_frame(property_strings, values = NULL)

Arguments

property_strings

vector of character containing property values in the form of prop1:value1+prop2:value2+prob3:value3+...

values

if given and not NULL this must be a vector of character as long as property_strings. The values will appear in a first column name of the returned data frame.

Examples

property_strings <- c(
  "id:peter+class:person",
  "id:germany+class:country"
)

kwb.fakin:::property_strings_to_data_frame(property_strings)
kwb.fakin:::property_strings_to_data_frame(property_strings, c("a", "b"))


KWB-R/kwb.fakin documentation built on June 14, 2022, 2 p.m.