官术网_书友最值得收藏!

read_fwf method

The read_fwf method is used to read data from fixed width files, where every field is in the same place in every line. The default usage will be to read the data in text format in the R workspace. The code for this is shown as follows:

read_fwf("data.txt")

Here, readr will try to guess the column widths. However, to avoid errors, you could also specify column widths explicitly as follows:

read_fwf(data.txt, fwf_widths(c(10, 20, 18), c("ID", "Revenue", "Region")))
主站蜘蛛池模板: 铜陵市| 策勒县| 托克托县| 桃园市| 句容市| 文登市| 丹棱县| 红河县| 岚皋县| 伊宁市| 东方市| 祥云县| 红原县| 沅陵县| 茌平县| 牡丹江市| 景东| 皋兰县| 陇川县| 田阳县| 汝南县| 双城市| 北川| 石阡县| 磐安县| 武山县| 日喀则市| 宝兴县| 蓬莱市| SHOW| 资阳市| 沙洋县| 阿巴嘎旗| 股票| 河源市| 嘉义县| 明水县| 都昌县| 玛沁县| 吉首市| 古蔺县|