Projective space is not affine I read a prove that the projective space $\mathbb P_{R}^{n}$ is not affine (n>0): (Remark 3.14 p72 Algebraic Geometry I by Wedhorn,Gortz).
It said that the canonical ring homomorphism $R$ to $\Gamma(\mathbb P_{R}^{n}, \mathcal{O}_{\mathbb P_{R}^{n}})$ is an isomorphism. This implies that for n>0 the scheme $\mathbb P_{R}^{n}$ is not affine, since otherwise $\mathbb P_{R}^{n}=Spec R$.
I am not clear about why is it impossible to have $\mathbb P_{R}^{n}=Spec R$?
And is what sense does the $=$ mean here?

First, let us review the definition of an affine scheme. An affine scheme $X$ is a locally ringed space isomorphic to $\operatorname{Spec} A$ for some commutative ring $A$. This means that if one knows one has an affine scheme $X$, then all one has to do to recover $A$ such that $X=\operatorname{Spec} A$ is to take global sections of the structure sheaf, ie $A\cong\Gamma(X,\mathcal{O}_X)$.
In order to prove that $\mathbb{P}^n_R$ is not affine, it suffices to show that $\operatorname{Spec}(\Gamma(\mathbb{P}^n_R,\mathcal{O}_{\mathbb{P}^n_R}))\cong \operatorname{Spec} R$ is not isomorphic to $\mathbb{P}^n_R$. This is due to a dimension argument- assume $R$ is noetherian, and $\dim R=d$. Then $\dim\mathbb{P}^n_R=d+n$, as $\dim R[x_1,\cdots,x_n]=d+n$. Unless $n=0$, the two cannot be isomorphic.
