Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run example #1

Open
msperlin opened this issue Aug 26, 2019 · 2 comments
Open

Can't run example #1

msperlin opened this issue Aug 26, 2019 · 2 comments

Comments

@msperlin
Copy link

msperlin commented Aug 26, 2019

library(fipe)
library(ggplot2)
library(dplyr)

bmw_x6  <- fipe_vehicle(
  model = "x6 ", 
  make = "bmw", 
  year = c(0, 2017:2015),
  date = seq.Date(as.Date("2013-01-01"), as.Date("2017-12-01"), by = "4 months")
)

bmw_x6 

Error in UseMethod("rename_") :
no applicable method for 'rename_' applied to an object of class "list"
In addition: Warning message:
All formats failed to parse. No formats found.

My session info:

R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 19.2

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3
LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=pt_BR.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=pt_BR.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=pt_BR.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] jsonlite_1.6 dplyr_0.8.3 ggplot2_3.2.1 fipe_0.0.1

loaded via a namespace (and not attached):
[1] Rcpp_1.0.2 rstudioapi_0.10 magrittr_1.5 tidyselect_0.2.5 munsell_0.5.0 colorspace_1.4-1
[7] R6_2.4.0 rlang_0.4.0 httr_1.4.1 stringr_1.4.0 tools_3.6.1 grid_3.6.1
[13] gtable_0.3.0 withr_2.1.2 lazyeval_0.2.2 assertthat_0.2.1 tibble_2.1.3 crayon_1.3.4
[19] purrr_0.3.2 curl_4.0 glue_1.3.1 stringi_1.4.3 compiler_3.6.1 pillar_1.4.2
[25] scales_1.0.0 lubridate_1.7.4 pkgconfig_2.0.2

@AnBarbosaBr
Copy link

I had the same problem, it was the locale.

Using Sys.setlocale(category = "LC_TIME", locale = "pt_BR") before the function solved it for me.

@hcostax
Copy link

hcostax commented Jan 28, 2020

I had the same problem, it was the locale.

Using:

Sys.setlocale("LC_TIME", "Portuguese") # Windows

before the function

this solved it for me.

for more: ?Sys.getlocale()

Examples

Sys.getlocale()
Sys.getlocale("LC_TIME")

Not run:
Sys.setlocale("LC_TIME", "de") # Solaris: details are OS-dependent
Sys.setlocale("LC_TIME", "de_DE.utf8") # Modern Linux etc.
Sys.setlocale("LC_TIME", "de_DE.UTF-8") # ditto
Sys.setlocale("LC_TIME", "de_DE") # OS X, in UTF-8
Sys.setlocale("LC_TIME", "German") # Windows

End(Not run)

Sys.getlocale("LC_PAPER") # may or may not be set

Not run:
Sys.setlocale("LC_COLLATE", "C") # turn off locale-specific sorting,
usually, but not on all platforms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants