我正在尝试使用来自在线资源的 httr 导入 csv,一切都很好,除了当它应该是双精度时它以整数形式读取列,导致这些值显示为 NA
我正在使用并遇到以下问题。
getdata <- GET(paste("https://rest.zuora.com/v1/files/",r$FileId, sep = ''), auth)
invoice <- content(getdata, type = "text/csv")
Parsed with column specification:
cols(
Account.external_id__c = col_integer(),
Invoice.Amount = col_double(),
Invoice.Balance = col_integer(),
Invoice.CreatedDate = col_datetime(format = "")
)
Warning: 171 parsing failures.
row col expected actual
2475 Invoice.Balance no trailing characters .4
2726 Invoice.Balance no trailing characters .71
3197 Invoice.Balance no trailing characters .3
3287 Invoice.Balance no trailing characters .5
3350 Invoice.Balance no trailing characters .1
.... ............... ...................... ......
See problems(...) for more details.
任何帮助表示赞赏,谢谢。