When CreateDataPartition. Testing and training occours error

indice <- createDataPartition(dados_clientes$inadimplente
,p = 0.75
,list = TRUE
,times = 1)

indice <- dados_clientes[indice,]
dados_treino<- dados_clientes[ indice, ]
dados_teste <- dados_clientes[-indice, ]

when execute code

dados_treino<- dados_clientes[ indice, ]
Error in xj[i] : invalid subscript type 'list'
dados_teste <- dados_clientes[-indice, ]
Error in xj[i] : invalid subscript type 'list'

if you don't want createDataPartition to result in a list, but rather a matrix use the list=FALSE parameter

This topic was automatically closed 7 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.