[R] Package Caret

Eric Berger er|cjberger @end|ng |rom gm@||@com
Fri Apr 14 08:47:26 CEST 2023


You first have to load the package using the library command.
> library(caret)

Then you can call createDataPartition. e.g.
> data(oil)
> createDataPartition(oilType,2)

HTH,
Eric


On Fri, Apr 14, 2023 at 7:52 AM Gábor Malomsoki <gmalomsoki1980 using gmail.com>
wrote:

> Dear all,
> When i try to use createDataPartition after calling package 'caret', i get
> the message:
> "could not find function createDataPartition"
>
> I use:
> R-4.2.3 for Windows
> RStudio-2023.03.0-386
>
> Do you have any experience with this failure?
>
> Thank you!
> Best regards
> Gabor
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list