Need help with opening data editor in R Studio

Hi everyone,

I am completely new to R studio and need help with viewing the data editor. I've installed XQuartz for my MacBook but unfortunately I'm still unable to open it. This is what was shown:

data.entry(1)
Error in .External2(C_dataentry, data, modes) :
unable to start data editor
In addition: Warning message:
In dataentry(odata, as.list(Modes)) : unable to open display

Any help would be greatly appreciated. Thank you very much