[R] Decision Tree: Am I Missing Anything?

Max Kuhn mxkuhn at gmail.com
Sat Sep 22 22:33:26 CEST 2012


Vik,

On Fri, Sep 21, 2012 at 12:42 PM, Vik Rubenfeld <vikr at mindspring.com> wrote:
> Max, I installed C50. I have a question about the syntax. Per the C50 manual:
>
> ## Default S3 method:
> C5.0(x, y, trials = 1, rules= FALSE,
> weights = NULL,
> control = C5.0Control(),
> costs = NULL, ...)
>
> ## S3 method for class ’formula’
> C5.0(formula, data, weights, subset,
> na.action = na.pass, ...)
>
> I believe I need the method for class 'formula'. But I don't yet see in the manual how to tell C50 that I want to use that method. If I run:
>
> respLevel = read.csv("Resp Level Data.csv")
> respLevelTree = C5.0(BRAND_NAME ~ PRI + PROM + REVW + MODE + FORM + FAMI + DRRE + FREC + SPED, data = respLevel)
>
> ...I get an error message:
>
> Error in gsub(":", ".", x, fixed = TRUE) :
>   input string 18 is invalid in this locale

You're not doing it wrong.

Can you send me the results of sessionInfo()? I think there are a few
issues with the function on windows, so a reproducible example would
help solve the issue.

-- 

Max




More information about the R-help mailing list