Example of $H^n(X,R)$ not equal to $Hom(H_n(X,R),R)$ The universal coefficient theorem shows that under suitable assumptions, the cohomology groups with coefficients in $R$ are simply the morphisms between the homology groups and $R$.
In general, though, the standard morphism $m:H^n(X,R)\to Hom_R(H_n(X,R),R)$ is only surjective, not injective.
Is there a standard, simple, illustrative example of the failure of $m$ to be one to one?
In particular, I'm looking for an example with $R$ a PID (and not too complicated), and $X$ a CW/cell complex.
Thanks!
Update: Sorry to all, I meant "ring". I don't know why I wrote "group" yesterday... Too little coffee I guess!
 A: Let me stick to the case that everything has coefficients in $\mathbb{Z}$. Then universal coefficients says that the sequence
$$0 \to \text{Ext}^1(H_{n-1}(X), \mathbb{Z}) \to H^n(X) \to \text{Hom}(H_n(X), \mathbb{Z}) \to 0$$
is exact, and so the natural morphism $H^n(X) \to \text{Hom}(H_n(X), \mathbb{Z})$ is an isomorphism iff 
$$\text{Ext}^1(H_{n-1}(X), \mathbb{Z}) = 0.$$ 
If $H_{n-1}(X)$ is finitely generated then $\text{Ext}^1(H_{n-1}(X), \mathbb{Z})$ is noncanonically isomorphic to the torsion subgroup of $H_{n-1}(X)$ (exercise), so this is true iff $H_{n-1}(X)$ is torsion-free.
Hence to find the simplest counterexample we should look at the simplest example of a space with torsion in its homology. Let's take $X = \mathbb{RP}^2$, so that $H_1(X) = \mathbb{Z}_2$ and $H_2(X) = 0$ (because $X$ is not orientable). Then $\text{Hom}(H_2(X), \mathbb{Z}) = 0$, but
$$H^2(X) = \text{Ext}^1(H_1(X), \mathbb{Z}) = \text{Ext}^1(\mathbb{Z}_2, \mathbb{Z}) = \mathbb{Z}_2.$$
A: Start with any $X$ which has torsion in first homology.
