Error in lenght(Y) : could not find function "lenght"

I am stumped:

Running the code

split <-sample.split(linear_reg$Height, SplitRatio = 0.7)

I get an error

Error in lenght(Y) : could not find function "lenght"

(spelling being incorrect come directly from RStudio)

I am not using the lenght / length function in my code at all.

Any idea what lenght(Y) refers to - especially since it is NOT defined or referenced in my code

Hi @Emile_Bosman, welcome to RStudio Community.

caTools::sample.split() works fine for me on the iris data set. Would you mind posting a reproducible example?

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.