I have a text file with 100 names that I am trying to concatenate to create a large single string using the following code. However, my output is showing me a number for each name instead of the actual names itself.
It seems that when these names are being converted into character using the paste function, they are being converted into numbers. Any help will be greatly appreciated.
input=(read.csv("names.txt"))
final_output1 = paste(input, collapse = '')
The read.csv() function has a "stringAsFactors" argument that you can set to FLASE.
input <- read.csv("names.txt", stringsAsFactors=FALSE)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With