#R--version: 4.1.1
Say I have a .txt-file with the content
a = c(1,2,3)
b = c(4,5,6)
and I want to read those statements into a list l
such that
l = list(a = c(1,2,3),b=(4,5,6))
e.g
l = read_into_list_func("path/to/file/my_file.txt")
l$a
#1 2 3
l$b
#4 5 6
I know how to read a txt-file but the issue is that instead of getting the command a=c(1,2,3)
I get the string 'a=c(1,2,3)'
.