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

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")))
主站蜘蛛池模板: 阜康市| 科技| 呼和浩特市| 皋兰县| 普格县| 襄垣县| 剑川县| 武强县| 阜南县| 十堰市| 和政县| 衡阳县| 郸城县| 都江堰市| 平江县| 黎城县| 班戈县| 鄱阳县| 青海省| 防城港市| 九台市| 双流县| 盐津县| 钦州市| 固原市| 鹰潭市| 汝南县| 巴中市| 偏关县| 深圳市| 蛟河市| 永清县| 凌海市| 彝良县| 凤冈县| 台南市| 涪陵区| 左权县| 云安县| 肃南| 东台市|