R: use of factor

后端 未结 3 2005
再見小時候
再見小時候 2020-12-24 04:35

I have some data:

transaction <- c(1,2,3);
date <- c(\"2010-01-31\",\"2010-02-28\",\"2010-03-31\");
type <- c(\"debit\", \"debit\", \"credit\");
amo         


        
3条回答
  •  别那么骄傲
    2020-12-24 05:21

    type will be converted from a character to a factor. The main difference is that factors have predefined levels. Thus their value can only be one of those levels or NA. Whereas characters can be anything.

提交回复
热议问题