In a recent paper, the authors concluded that the topology of their tree is very similar to a previous study, giving P < 0.001 and ρ = 0.947. I think it could be a correlation test, but I don't know how to achieve this. Can I do this in R? What package/function should I use?

You can look at the Robinson-Foulds metric as an example of comparing topologies.

The ETE3 toolkit is really good for this.

Yes, it is possible in the R. Provided that you have same number of elements in both trees, you can convert back phylogenetic tree to distance matrix using R function

`cophenetic()`

. Once you get distance matrix, convert it in to object of distance class using function`dist()`

. On the distance class object call function`cor()`

which will give you correlation between two trees.What is the paper? It is very unlikely the authors made such claim without specifying which test they performed.