nevrome / covid19germany

R package - Load, visualise and analyse daily updated data on the COVID-19 outbreak in Germany
Other
46 stars 8 forks source link

Error: Only strings can be converted to symbols #36

Closed Uwe-B closed 3 years ago

Uwe-B commented 3 years ago

New to R, running R 4.0.3 on Win7. Not sure what went wrong. Several errors, help is much appretiated:

covid19germany::group_RKI_timeseries(data, Bundesland | Landkreis | Gender | Age) Fehler: Only strings can be converted to symbols Run rlang::last_error() to see where the error occurred. rlang::last_error() <error/rlang_error> Only strings can be converted to symbols Backtrace:

  1. covid19germany::group_RKI_timeseries(...)
  2. rlang::ensyms(...)
  3. rlang:::map(...)
  4. base::lapply(.x, .f, ...)
  5. rlang:::FUN(X[[i]], ...)
  6. rlang::sym(expr) Run rlang::last_trace() to see the full context.

covid19germany::get_RKI_spatial("Bundesland" | "Landkreis") Fehler in "Bundesland" | "Landkreis" : Operationen sind nur für numerische, logische oder komplexe Typen möglich

covid19germany::group_RKItimeseries(data) Fehler in UseMethod("select") : nicht anwendbare Methode für 'select' auf Objekt der Klasse "function" angewendet Zusätzlich: Warnmeldung: `select()is deprecated as of dplyr 0.7.0. Please useselect()instead. This warning is displayed once every 8 hours. Calllifecycle::last_warnings()` to see where this warning was generated. lifecycle::last_warnings() [[1]]

message: `select_()` is deprecated as of dplyr 0.7.0. Please use `select()` instead. This warning is displayed once every 8 hours. Call `lifecycle::last_warnings()` to see where this warning was generated. backtrace: 1. covid19germany::group_RKI_timeseries(data) 11. dplyr:::select.default(...) 12. dplyr::select_(.data, .dots = compat_as_lazy_dots(...)) 13. dplyr:::lazy_deprec("select", hint = FALSE)
nevrome commented 3 years ago

"Bundesland" | "Landkreis" is not correct syntax. Same holds true for Bundesland | Landkreis | Gender | Age. Maybe our example code is a bit confusing.

You can call either covid19germany::get_RKI_spatial("Bundesland") or covid19germany::get_RKI_spatial("Landkreis"). And either covid19germany::group_RKI_timeseries(data, Bundesland) or covid19germany::group_RKI_timeseries(rki, Age), ...

Uwe-B commented 3 years ago

I used the readme examples.

Uwe-B commented 3 years ago

Thank You, now I understand, sorry my fault. Still got this error:

covid19germany::group_RKItimeseries(data, Bundesland) Fehler in UseMethod("select") : nicht anwendbare Methode für 'select_' auf Objekt der Klasse "function" angewendet

nevrome commented 3 years ago

I made the example code more clear now. Please try this:

rki <- covid19germany::get_RKI_timeseries()
covid19germany::group_RKI_timeseries(rki, Bundesland)
Uwe-B commented 3 years ago

Thanks You, it is working! I see my problem now. Willt try to work with it now without bothering you.

nevrome commented 3 years ago

Good luck!