[R] replacement has *** rows, data has ***

David Winsemius dwinsemius at comcast.net
Tue Jun 13 00:06:09 CEST 2017

> On Jun 12, 2017, at 1:32 PM, Manqing Liu <hopkins0727 at gmail.com> wrote:
> Hi all,
> I created a predicted variable based on a model, but somehow not all
> observations have a predicted value. When I tired to add the predicated
> value to the main data set (data$pr <- pr) , it said:
> replacement has 34333 rows, data has 34347.
> Do you know how to solve that?
> Thanks,
> Manqing
> 	[[alternative HTML version deleted]]

First, you should read the Posting Guide. Then you should read the help page for ?predict. 

Only then should  you write a follow-up email (in plain text) with code that constructs a simple example using whatever method was used to construct this `pr` variable and  provide enough information to support a sensible answer.
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.

David Winsemius
Alameda, CA, USA

More information about the R-help mailing list