none
Change data type of a column to factor in xdf RRS feed

  • Question

  • Hi experts,

    I would like to change data type of a column in an xdf file to factor. How can I do that. I have tried this line of code but it doesnt help.

    rxDataStep(nyc_jan_xdf,transforms = list(as.factor(Cash_VS_Card)))

    Current values in this column are: "Card", "Cash", "Others" of data type Charachter

    Thank you for your helps

    Tuesday, May 16, 2017 2:56 PM

All replies

  • Try rxFactors(nyc_jan_xdf, factorInfo="Cash_VS_Card", outFile="newNycJan.xdf")

    Cheers,

    Rich Calaway

    Microsoft R Product Team

    Wednesday, May 24, 2017 6:21 PM