Displaying 2 results from an estimated 2 matches for "cutgood".
2018 Feb 08
2
sparse.model.matrix Generates Non-Existent Factor Levels if Ord.factor Columns Present
...ere not in the original dataset. The first factor appears to be correctly transformed, but the following factors don't. For example:
diamonds <- as.data.frame(ggplot2::diamonds)
> colnames(sparse.model.matrix(~ . -1, diamonds))
[1] "carat" "cutFair" "cutGood" "cutVery Good" "cutPremium" "cutIdeal" "color.L" "color.Q" "color.C" "color^4" "color^5"
[12] "color^6" "clarity.L" "clarity.Q" "cl...
2018 Feb 08
0
sparse.model.matrix Generates Non-Existent Factor Levels if Ord.factor Columns Present
...inal dataset. The first factor appears to be correctly transformed, but the following factors don't. For example:
>
> diamonds <- as.data.frame(ggplot2::diamonds)
>> colnames(sparse.model.matrix(~ . -1, diamonds))
> [1] "carat" "cutFair" "cutGood" "cutVery Good" "cutPremium" "cutIdeal" "color.L" "color.Q" "color.C" "color^4" "color^5"
> [12] "color^6" "clarity.L" "clarity.Q" &qu...