R write dataframe column to csv having leading zeroes

后端 未结 7 1099
故里飘歌
故里飘歌 2020-12-21 04:21

I have a table that stores prefixes of different lengths.. snippet of table(ClusterTable)

ClusterTable[ClusterTable$FeatureIndex == \"Prefix2\",\'Feat

7条回答
  •  眼角桃花
    2020-12-21 04:59

    When dealing with leading zeros you need to be cautious if exporting to excel. Excel has a tendency to outsmart itself and automatically trim leading zeros. You code is fine otherwise and opening the file in any other text editor should show the zeros.

提交回复
热议问题