Are the RandomForest and Ranger libraries the same? After being stuck in this question, I found another way to perform random forest.
I'm trying to compare a normal random forest model (train & test/predicted) and time series data. My data have date columns, my target variable plus another predictor. I used the train() function from the ranger package for my target variable with the predictor. Based on my understanding ranger is a random forest.
However, after converting my data to time series (ts) I got error when I ran train() from ranger on my time series data, but it worked when I ran the randomForest() function.
Are ranger and randomForest the same?
I know in my case if I applied random forest and train() from ranger I won't get the same results because one is time series and one have more variables but If I applied the same dataset to randomForest() and train() will I get the same result?

They are different implementations of the same algorithm. As random forest utilises bagging and bagging is inherently stochastic, we cannot guarantee that they will give exactly the same result. That said, if one downright errs, this is a coding issue rather than a statistical one.
