readr : Turn off scientific notation in write_csv

后端 未结 6 2008
谎友^
谎友^ 2021-02-07 02:54

I am using R to process Census data which uses really long numeric GEOIDs to identify the geographies. The issue I am facing is when writing out the processed data using w

6条回答
  •  情书的邮戳
    2021-02-07 03:16

    I'd rather suggest recoding such columns to type int, because if so write_* won't use scientific number encoding anymore. To convert all numeric columns in one pass (e.g. in case you're dealing with a counts matrix), you could do:

    require(dplyr)    
    tbl_df = mutate_if(tbl_df, is.numeric, as.integer)
    

提交回复
热议问题