Displaying 2 results from an estimated 2 matches for "sevenc".
Did you mean:
seven
2010 Aug 17
3
Sweave
Dear R users,
I am using Sweave.
I would like to use the width option for the graphics :
\begin{figure}[h!]
\centering
\includegraphics[width=0.7\textwidth]{x}
\end{figure}
How do I get this ?
Thank you very much,
Randall
[[alternative HTML version deleted]]
2010 Aug 17
4
replacing values in a vector
Dear helpRs
Does anyone have an elegant way of doing the following:
For a given numeric vector, e.g. vec <- c(3,2,6,4,7)
Create a series of vectors where all but 1 of the values are replaced by
0's, e.g.
vec.a <- c(3,0,0,0,0)
vec.b <- c(0,2,0,0,0)
vec.c <- c(0,0,6,0,0)
vec.d <- c(0,0,0,4,0)
vec.e <- c(0,0,0,0,7)
I have looked at `replace', but can't think of a