[R] Incorrect Summarization after As.numeric

Ista Zahn istazahn at gmail.com
Mon Dec 28 17:13:27 CET 2015


FAQ 7.10 perhaps.
On Dec 28, 2015 10:51 AM, "SHIVI BHATIA" <shivi.bhatia at safexpress.com>
wrote:

> Dear Team,
>
>
>
> I am working on aggregate function in R & have used the below code:
>
>
>
> aggregate(a1$Final,list(Year=a1$Year),sum)
>
>
>
> initially a1$Final was factor hence I used a1$Final= as.numeric(a1$Final)
> to
> convert this into numeric. After conversion it shows the output but the
> summarization from the aggregate is incorrect. This I have reconciled with
> the excel pivot.
>
>
>
> Could you please suggest where could be the issue?
>
>
>
> Thanks, Shivi
>
> Mb: 9891002021
>
>
>
>
> This e-mail is confidential. It may also be legally privileged. If you are
> not the addressee you may not copy, forward, disclose or use any part of
> it. If you have received this message in error, please delete it and all
> copies from your system and notify the sender immediately by return e-mail.
> Internet communications cannot be guaranteed to be timely, secure, error or
> virus-free. The sender does not accept liability for any errors or
> omissions.
>
> ______________________________________________
> 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.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list