search for: tp4381586p4381614

Displaying 1 result from an estimated 1 matches for "tp4381586p4381614".

2012 Feb 12
3
Vector manipulation
Hello, I am stuck with the following problem. Consider the vector: vec <- c(2,4,6,9,10) I now want to use R to manipulate the vector as follows: [1] 2, 4, 2, 6, 2, 9, 2, 10 In words, the first element of the vector should be placed in front of each following number. Which R commands do I need to achieve that? Cheers -- View this message in context: