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

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")))
主站蜘蛛池模板: 汤阴县| 化德县| 陇南市| 阿拉善左旗| 陇川县| 西华县| 阜新| 沙田区| 齐齐哈尔市| 乐陵市| 乌拉特中旗| 佳木斯市| 沙田区| 浦城县| 桂林市| 芜湖县| 万载县| 顺昌县| 新巴尔虎左旗| 铁力市| 北辰区| 随州市| 阳西县| 铜梁县| 永川市| 集安市| 衢州市| 丹巴县| 荆门市| 彝良县| 施秉县| 枞阳县| 肥西县| 阳江市| 五指山市| 清涧县| 玉屏| 宜黄县| 沅江市| 抚远县| 崇明县|