Skip to content
Prev 359582 / 398503 Next

How to add no data entries into current dataframe?

You could make a vector with all possible IDs. Use %in% to get just those
that are missing.

missing.id <- c (101:1000)
missing.id <- missing.id[! missing.id %in% s $ID]

Df2 <- data.frame(ID = missing.id,
CODE = paste0 (PDT, missing.id),
VAR = 0)

Modify your original data.frame so you can rind df2 and cast as you already
do.

I haven't tested the above and you might have to tweak it a bit.

Hope it helps
Ulrik
,
Jeff Newmiller <jdnewmil at dcn.davis.ca.us> schrieb am Fr., 25. M?rz 2016
06:37: