\begin{Schunk}
\begin{Sinput}
 dat$wn2 <- gsub("f", "PJ", dat$wn, fixed = TRUE)
 head(dat[ , c("wn", "wn2")], 7)
\end{Sinput}
\begin{Soutput}
  wn wn2
1 g1  g1
2 f2 PJ2
3 i3  i3
4 h4  h4
5 g5  g5
6 i6  i6
7 h7  h7
\end{Soutput}
\end{Schunk}
