facebookexperimental / Robyn

Robyn is an experimental, AI/ML-powered and open sourced Marketing Mix Modeling (MMM) package from Meta Marketing Science. Our mission is to democratise modeling knowledge, inspire the industry through innovation, reduce human bias in the modeling process & build a strong open source marketing science community.
https://facebookexperimental.github.io/Robyn/
MIT License
1.07k stars 322 forks source link

Error in check_datevar #957

Closed kevinSTS closed 2 months ago

kevinSTS commented 2 months ago

Project Robyn

This is the error output when running InputCollect:

_Error in check_datevar(dt_input, date_var) : You must provide only 1 correct date variable name for 'datevar'

There are no errors up to InputCollect.

Here is date column of the CSV file being imported. Date column of type date, and the others of type general.

Capture
InputCollect <- robyn_inputs(
  dt_input = dt_input_file,  (name of file from import
  dt_holidays = dt_prophet_holidays,
  date_var = "Date", 

Environment & Robyn version

gufengzhou commented 2 months ago

Please check your dataframe dt_input_file within R first, not just in Excel

kevinSTS commented 2 months ago

Thanks gufengzhou. Encoding during the csv import changed the first column name from Date to i..Date. Adding encoding to the read line fixed this. read.csv('<fileName>.csv', fileEncoding = 'UTF-8-BOM')