This question is studied and partially answered in http://front.math.ucdavis.edu/0904.3153. The answer depends not only on $R$ but also on $n$.