[R] Looping Through DataFrames with Differing Lenghts

Paul Bernal paulbernal07 at gmail.com
Mon Mar 27 22:09:59 CEST 2017


Dear friends,

I have one dataframe which contains 378 observations, and another one,
containing 362 observations.

Both dataframes have two columns, one date column and another one with the
number of transits.

I wanted to come up with a code so that I could fill in the dates that are
missing in one of the dataframes and replace the column of transits with
the value NA.

I have tried several things but R obviously complains that the length of
the dataframes are different.

How can I solve this?

Any guidance will be greatly appreciated,

Best regards,

Paul

	[[alternative HTML version deleted]]



More information about the R-help mailing list