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

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")))
主站蜘蛛池模板: 通化市| 甘谷县| 专栏| 竹溪县| 通化市| 东辽县| 巨鹿县| 苍山县| 怀化市| 东平县| 满城县| 久治县| 绥芬河市| 鲁甸县| 婺源县| 儋州市| 丰顺县| 金华市| 榆中县| 东山县| 高邑县| 商丘市| 五大连池市| 饶河县| 红河县| 庄河市| 南木林县| 台北县| 电白县| 桓仁| 兴化市| 娄烦县| 应城市| 江城| 大埔区| 昌图县| 江北区| 泽州县| 定州市| 银川市| 满洲里市|