coords_xy: Parse coords of points

View source: R/alto.R

coords_xyR Documentation

Parse coords of points

Description

Parse coords of points where the list of coordinates is available in a string as follows: x1,y1 x2,y2, x3,y3

Usage

coords_xy(data, split = ",")

Arguments

data

a character vector or a list of character data

split

which split character to use between x and y. Defaults to ','

Value

a list of data.frames with columns x and y

Examples

x <- c("0.1,0.2 0.3,0.15", "", NA, "1,2 3,4 5,6 1,0")
coords_xy(x)
x <- c("0.1,0.2 0.3,0.15", "", NA, "1,2 3,4 5,6 1,0")
x <- strsplit(x, " ")
coords_xy(x)

DIGI-VUB/madoc.utils documentation built on Sept. 14, 2022, 3:03 p.m.