Jeff08 wrote:
Sample Data.Frame format

Name is Returns.names

            X       id ticker      date_ adjClose totret RankStk
427225 427225 00174410    AHS 2001-11-13    21.66    100    1235


"id" uniquely defines a row


What I am trying to do is add missing data for each ID.

Important Information: Date is not continuous, the data points are for
trading days, so weekends/certain holidays are off

x<-unique(Returns.names$date_) gives me the list of all the possible trading
days.

For days that are missing, I would like to add a row for that date & the
same totret as the previous day.

I cant think of an easy way to do this


See this thread...

http://www.opensubscriber.com/message/r-h...@stat.math.ethz.ch/6986471.html

specifically the last post by Gabor.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to