1
を\私はこのようなウェブチャットログの数を持っている: rをする上のRでreadlines nはn個
Agent: Click here. \n Then click here. \n Then do this. \r\n
Customer: Show me. \r\n
Agent: Ok. \n One Second. \r\n
私はRIにインポートする場合のみ\ rを\ nは改行として扱いたいです、 \ nではありません。私はreadline()でそれを行うオプションはありませんか?これを行う最善の方法はありますか?ここで
Pythonでスタックオーバーフローのソリューションです:How to split only on carriage returns with readlines in python?
'scan'の代わりに' readr :: read_file'を使うと少しシンプルになると思います。 – Scarabee