Functor of points of the completion of a ring Let $R$ be a ring, with ideal $I$, and let $\widehat{R}_I$ be the completion $\varprojlim R / I^n$ of $R$. Can I somehow describe the functor $\mathrm{Hom}(\widehat{R}_I,?) : Rings \to Sets$ in an easy way?  
The answer here suggests it should be $\varinjlim \mathrm{Hom} (R / I^n , ?)$, but certainly that can't be true, as this does not include for instance the identity $\widehat{R}_I \to \widehat{R}_I$. 
 A: $\newcommand{\Spec}{\mathrm{Spec}}$$\newcommand{\Spf}{\mathrm{Spf}}$$\newcommand{\Hom}{\mathrm{Hom}}$The point is that $\mathrm{Spec}(\widehat{R})$ $\newcommand{\Z}{\mathbb{Z}}$and $\mathrm{Spf}(\widehat{R})$$\newcommand{\h}{\mathcal{O}}$ are different objects. In particular 
$$\mathrm{Hom}(\Spec(A),\mathrm{Spec}(\widehat{R}))=\Hom(\widehat{R},A)$$
whereas
$$\Hom(\Spec(A),\Spf(\widehat{R}))=\Hom_\text{cont.}(\widehat{R},A)$$
where $A$ is given the discrete topology and $\widehat{R}$ is given the $I$-adic topology. In particular, since a continuous map $f:\widehat{R}\to A$ has open kernel we see that $I^n\subseteq\ker f$ for some $n$ so that our map factors through $\widehat{R}/I^n=R/I^n$ (which has the discrete topology since $I^n$ is open). This is why 
$$\Hom_\text{cont.}(\widehat{R},A)=\varinjlim \Hom(R/I^n,A)$$
Maybe now you see the inherent issue. Are you talking about the identity map on $\Spf(\widehat{R})$ or on $\Spec(\widehat{R})$? The point is that you either need to think of the identity map as a map $\widehat{R}\to\widehat{R}$ where they are both given the discrete topology or both given the $I$-adic topology. To apply the above factors-through-$R/I^n$-shenanigans you'd need the identity to be a continuous map $\widehat{R}\to\widehat{R}$ where the domain is given the $I$-adic topology and the codomain the discrete topology--but the identity is not a continuous map in that situation!
In the above language the functor of points on $\mathrm{Spf}(\widehat{R})$ is much more descriable than $\mathrm{Spec}(\widehat{R})$--they are different spaces altogether (if $\widehat{R}=\mathbb{Z}_p$ the former is one point, and the latter is two for example). I don't know a concrete description of the functor of points of $\mathrm{Spec}(\widehat{R})$ in simple terms.
EDIT:

But wait, I learned that formal spectra can be defined as a formal colimit, so $\Spf(\widehat{R})=\varinjlim \Spec(R/I^n)$. On the other hand, $\widehat{R}=\varprojlim R/I^n$, so in the opposite category, $\Spec(\widehat{R})=\varinjlim \Spec(R/I^n)$, which indicates $\Spec(\widehat{R})=\Spf(\widehat{R})$... which makes no sense...

In fact, the colimit $\varinjlim \Spec(\Z/p^n\Z)$ exists in the category of schemes. Indeed, it's $\Spec(\Z_p)$. For affine schemes you've already explained it, and note that if $A$ is any local ring and $X$ any scheme then 
$$\Hom(\Spec(A),X)=\{(x,\varphi):x\in X\text{ and }\varphi:A\to \h_{X,x}\}$$
Since the maps $\Spec(\Z/p^n\Z)\to\Spec(\Z/p^{n+1}\Z)$ are homeomorphisms it's not hard to see that 
$$\begin{aligned}\Hom(\Spec(\Z_p),X) &=\{(x,\varphi):x\in X\text{ and }\varphi:\Z_p\to \h_{X,x}\}\\ &= \varprojlim\{(x,\varphi_n):x\in X\text{ and }\varphi_n:\Z/p^n\Z\to\h_{X,x}\}\\ &= \varprojlim \Hom(\Spec(\Z/p^n\Z),X)\end{aligned}$$
which shows that $\Spec(\Z_p)$ is actually the colimit of $\Spec(\Z/p^n\Z)$ in the category of schemes.
The point though is that $\Spf(\Z_p)$ is NOT the colmit of $\Spec(\Z/p^n\Z)$ in schemes, but the colimit in either of the following two categories:


*

*The category $\mathsf{LTRS}$ of locally topologically ringed spaces (this is the 'topological solution')

*The presheaf category $\mathsf{PSh}(\mathsf{Aff})$ (this is the 'formal colimit solution' you alluded to).


For example, exactly as you pointed out we have that 
$$\Hom(\Spec(B),\Spec(\Z_p))\ne \varinjlim \Hom(\Spec(B),\Spec(\Z/p^n\Z))$$
which means that 
$$\Hom(-,\Spec(\Z_p))\ne \varinjlim \Hom(-,\Spec(\Z/p^n\Z))$$
in $\mathsf{PSh}(\mathsf{Aff})$. We've also already explained why
$$\Hom(-,\Spf(\Z_p))=\varinjlim \Hom(-,\Spec(\Z/p^n\Z))$$
in $\mathsf{Psh}(\mathsf{Aff})$ (where, recall, $\mathsf{Aff}$ means spectra of rings or, equivalently, formal spectra of discrete rings).
The fact that $\Spec(\Z_p)$ is not the colimit of $\Spec(\Z/p^n\Z)$ in $\mathsf{LTRS}$ is also clear since this colimit has underlying space the colimit of the topological spaces. But, $\varinjlim |\Spec(\Z/p^n\Z)|$ is a point, and $\Spec(\Z_p)$ is not. Try to convince yourself that $\Spf(\Z_p)$ with its structure sheaf whose value on the point is the topological ring $\Z_p$ is the colimit of $\Spec(\Z/p^n\Z)$ in $\mathsf{LTRS}$.
EDIT EDIT: As to your second question, note that for any affine scheme $\Spec(A)$ we have that 
$$\begin{aligned}\Hom_{\mathsf{PSh}}(\Spf(\widehat{R}),\Spec(A)) &=\Hom_{\mathsf{LTRS}}(\Spf(\widehat{R}),\Spec(A))\\ &=\Hom_\text{cont.}(A,\widehat{R})\\ &=\Hom(A,\widehat{R})\\ &=\Hom_{\mathsf{PSh}}(\Spec(\widehat{R}),A)\end{aligned}$$
where we have used the fact that $A$ is discrete to say that all maps $A\to\widehat{R}$ are continuous.
