Hi Troels,
Not sure this is what you want.
> X<-runif(9,0,10)
> FF1<-data.frame(ID=c(1,2,3)[rep(c(1,1,1,2,2,2,3,3,3))],
> PERIOD=c(1,2,3)[rep(c(1,2,3),times=3)],X=X)
> FF1$X[4]<-NA
> FF1
ID PERIOD X
1 1 1 8.27119347
2 1 2 9.64698097
3 1 3 2.74132386
4 2 1
Thanks a lot - beautiful
Troels
Den 16-05-2012 19:29, David Winsemius skrev:
On May 16, 2012, at 11:56 AM, Troels Ring wrote:
Dear friends - I hope you will forgive me another simple question,
illustrated by
ID <- c(1,1,1,2,2,3,3,3)
PERIOD <- c(1,2,3,2,3,1,2,3)
X <- runif(8,0,10))
Extrane
On May 16, 2012, at 11:56 AM, Troels Ring wrote:
Dear friends - I hope you will forgive me another simple question,
illustrated by
ID <- c(1,1,1,2,2,3,3,3)
PERIOD <- c(1,2,3,2,3,1,2,3)
X <- runif(8,0,10))
Extraneous paren removed:
FF <- data.frame(ID=ID,PERIOD=PERIOD,X=X)
I need to the
Your first statement may create a data frame, but your second
statement now store a vector in an object with the same name, but is
now not a data frame, that is why it "appears" that the first row is
overwritten. What are you trying to do?
On 10/23/07, pharos <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
4 matches
Mail list logo