Unable to start Rstudio

I keep getting the error Unable to determine real path of R script linux even though I have R installed.
when I type in which R it gives me the path /usr/bin/R but for some reason Rstudio is trying to access the R in miniconda.
Hope someone can help me with this