my createDataPartition Function is not working ?

> test_index <- createDataPartition(y, times = 1, p = 0.5, list = FALSE)
Error in createDataPartition(y, times = 1, p = 0.5, list = FALSE) : 
  could not find function "createDataPartition"

You have to load the library before using its functions, in this case, I think the library is caret so try running this first.

library(caret)

okay done , Thanks ! Although I used library(caret) before . It was showing error then.
I Did it again now it's done , i Don't know why but it's working now .

You only have to install the package once but you need to load it on each new R session you want to use it on.

1 Like

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.