I have a number of text files containing psuedo coordinates with a format of [x1 y1][x2 y2]... I am trying to import these files into R so I can analyse them. However when I import them using read.table
they become a list with two variables (x and y) with each value being "[x" or "y]" and each variable having a number of factors. My question is there a way to import or manipulate the data so that it is a dataframe of the numerical x values and y values only?
I have attempted removing the "[" and "]" characters using substr() but get
"Error in nchar(test[1, 2]) : 'nchar()' requires a character vector"
as an error message.