[R] Fill NA values in columns with values of another column

2024-08-27 Thread Francesca PANCOTTO via R-help
Dear Contributors, I have a problem with a database composed of many individuals for many periods, for which I need to perform a manipulation of data as follows. Here I report the procedure I need to do for the first 32 observations of the first period. cbind(VB1d[,1],s1id[,1]) [,1] [,2] [

Re: [R] Create a numeric series in an efficient way

2024-06-13 Thread Francesca PANCOTTO via R-help
I apologize, I solved the problem, sorry for that. f. Il giorno gio 13 giu 2024 alle ore 16:42 Francesca PANCOTTO < francesca.panco...@unimore.it> ha scritto: > Dear Contributors > I am trying to create a numeric series with repeated numbers, not > difficult task, but I do not seem to find an e

[R] Create a numeric series in an efficient way

2024-06-13 Thread Francesca PANCOTTO via R-help
Dear Contributors I am trying to create a numeric series with repeated numbers, not difficult task, but I do not seem to find an efficient way. This is my solution blocB <- c(rep(x = 1, times = 84), rep(x = 2, times = 84), rep(x = 3, times = 84), rep(x = 4, times = 84), rep(x = 5, times = 84), re