Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Error Code with R Tool

jbh1128d1
10 - Fireball

I've ran the following code in R studio with no issue.

 

"model <- lm(claims ~ veh_age + length, data = comp_training_set)

 

summary(model)"

 

I then (using the exact same data set), input that code into the R tool in Alteryx as the following: 

 

"data <- read.Alteryx("#1", mode="data.frame")

 

write.Alteryx(data, 1)

 

model <- lm(claims ~ veh_age + length, data = data)

 

write.Alteryx(summary(model), 2)"

 

I get the following errors:

 

R (2) Error in `[[.factor`(the.column, 1) :
R (2) Execution halted
R (2) The R.exe exit code (1) indicated an error.

 

Why would this run in r-studio and not r?

3 REPLIES 3
jbh1128d1
10 - Fireball

Nevermind.......Had to change claims to the correct data type....double.

r4upadhye
11 - Bolide

Hi,

 

I got similar error, not sure which field type to change.

 

The R.exe exit code (1) indicated an error.

jbh1128d1
10 - Fireball

Hi @r4upadhye.  I changed the response to a double.  It was a string. 

Labels