[R] Extending a data frame

Bernd Weiss bernd.weiss at uni-koeln.de
Wed Sep 21 14:47:24 CEST 2005


Dear all,

all data I am talking about can be found at 
<http://www.metaanalyse.de/tmp/test.dat>. 

The R-code is located at <http://www.metaanalyse.de/tmp/test.R>

I'd like to plot the frequencies for status against year. 

Typing table(tmp$year) it can be simple seen that some years are 
missing, e.g. 1975-1978, 1981 etc. 

Using xyplot to display the data I do not like the fact that some of 
the years are missing (due to missing observations, of course...). 

Is there any sensible way to extend the data frame (or the table or 
xyplot?) with the years that are missing? In other words: in need a 
continuous x-axis ranging from 1974 to 2004. 

TIA,

Bernd




More information about the R-help mailing list