1

I want to expand my data by a time series for every ID, OCC and DOSE available in my dfin.

times <- c(2,4)

dfin <-
ID  OCC  DOSE
1    1    0.1
1    2    0.2
2    1    0.1


dfout <- 
ID  OCC  DOSE  TIME
1    1    0.1   2
1    1    0.1   4
1    2    0.2   2
1    2    0.2   4
2    1    0.1   2
2    1    0.1   4

how can i do this in RStudio?

Amer
  • 1,979
  • 3
  • 19
  • 35

0 Answers0