Finall R file

Made gsub command linewrap properly.