I'm trying to read a .txt file into rstudio. The file consists of 13 columns and 71 rows. The first column is an ID with characters and numbers (e.g., subject001) and the remaining columns are all numbers (with the exception of some "NaNs" indicating that the participant did not provide a response).
When I try to import the file using this command:
df <- readtext("file.txt")
it creates a table with one row and 2 columns. The first column is called "doc_id" and is just the name of the file. The second column is called "text" and includes all the column headers but not any data (that I can see).
Any help would be much appreciated. Thank you!
Referred here from support.rstudio.com