Boa noite!
estou com um erro no código abaixo e não consigo descobrir o motivo. Já
executei esse mesmo código em outra maquina.
versao do R
version.string R version 3.6.1 (2019-07-05)
library(readxl)Salario <-
read_excel("F:/FIAP/R/Excel/Salario.xlsx")View(Salario)
attach(Salario)install.packages("dplyr")library(dplyr)agregar
<-summarise(group_by(Salario, id), salario_m =
mean(salario_m), data_pagamento_min=min(data_pagamento),
data_pagamento_max=max(data_pagamento),
contagem =n())agregar
View(agregar)
install.packages("rfm")install.packages("lubridate")library(rfm)library(lubridate)
data_atual <- lubridate::as_date("2019-04-05", tz = "UTC-3")agregar$data_atual
<-data_atualattach(agregar)
data_compra <-lubridate::as_date(data_pagamento_max,
tz="UTC")agregar$data_compra<-data_compra
attach(agregar)View(agregar)
rfm_result <- rfm_table_order(agregar, id, data_compra, salario_m,
data_atual)rfm_result
install.packages("tibble")library(tibble)
rfm<-as.tibble(rfm_result)rfm
erro
Error: Tibble columns must have consistent lengths, only values of length one
are recycled:* Length 0: Requested with `.rows` argument* Length 50: Column
`rfm`Call `rlang::last_error()` to see a backtraceIn addition: Warning
message:`as.tibble()` is deprecated, use `as_tibble()` (but mind the new
semantics).This warning is displayed once per session.
Edmar
_______________________________________________
R-br mailing list
R-br@listas.c3sl.ufpr.br
https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código
mínimo reproduzível.