### How to obtain the corr (u_i, Xb) for the regression of the fixed effects of panel data in R

I'm trying to develop a fixed-effect regression model for panel data using the plm packet in R. I want to get the correlation between fixed effects and regressors. Something like the corr (u_i, Xb) that comes in the output of Stata. How to get it in