Reading a dat file in R

r

#1

I want to read a .dat file in R as a string. I tried all the options in the read.csv() funciton and the read.table() function but I am still unable to do that.
Can someone suggest me the way to do this?


#2

@Harshita_Dudhe-you can readlines if you want to check starting few lines
readLines(" ",n=6)

Hope this helps!
Regards,
hinduja1234