[R] Column 'xyz' does not exist
Uwe Ligges
||gge@ @end|ng |rom @t@t|@t|k@tu-dortmund@de
Tue Jul 30 11:29:58 CEST 2019
Use the functional style such as mean(x) instead of the piping style
such as x %>% mean.
Best,
Uwe Ligges
On 30.07.2019 11:26, Tolulope Adeagbo wrote:
> Thanks Uwe, maybe i can be clearer; the error is: Warning: Error in :
> Column `Previous_stage` is unknown.
> Ans please what do you mean by functional programming style?
>
> On Tue, Jul 30, 2019 at 10:18 AM Uwe Ligges
> <ligges using statistik.tu-dortmund.de
> <mailto:ligges using statistik.tu-dortmund.de>> wrote:
>
> Don't use pipes but functional programming style, then you can eaasily
> traceback() and use debugging tools.
>
> Best,
> Uwe Ligges
>
>
> On 30.07.2019 11:03, Tolulope Adeagbo wrote:
> > So I'm having this error:
> >
> > column 'Previous stage does not exist'
> >
> > bal_matrix = loan_data_2 %>% as.tibble() %>%
> > dplyr::arrange(Account_number) %>%
> > dplyr::group_by(Previous_stage, Current_stage) %>%
> > dplyr::summarise(
> > Total_bal = sum(Balance, na.rm = TRUE)
> > ) %>%
> > tidyr::spread(key = Current_stage, value = Total_bal, fill = 0)
> >
> > Please assist.
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help using r-project.org <mailto:R-help using 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.
> >
>
More information about the R-help
mailing list