I have a .txt where the data is stored in the following format:
{{1, 2, 3, 4, 5}, {10, 9, 8, 7, 6}, {1, 3, 5, 7, 9}}
It is meant to be loaded as a 5x3 matrix, where the inner curly braces define the 3 vectors and the outer curly braces define the matrix.
For a single vector it was simple to use the scan() function to load the text as a character vector then use substr() to remove the braces, but it seems like there has to be a package or base function that reads vectors and matrices with this notation. I unfortunately have not been able to find anything on this topic after a few hours of searching.
Thanks