Giter Club home page Giter Club logo

impactr's Introduction

Lucas Veras' logo



Hello, I'm Lucas, a brazilian software developer based in Portugal. I mainly work with web development and data science, and I'm always eager to learn new skills.

Tech stack

HTML CSS Javascript React NPM Git Github

impactr's People

Contributors

verasls avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

jimhester

impactr's Issues

Warnings generated when saving the non-wear plot of a data whose filename has special characters

remove_nonwear() generates warnings when you try to save the non-wear plot into a file and the filename attribute of the impactr_data object has some special characters.

This is due to the fact that the pdf device opened to save the plot does not support some special characters and then throws the warning when it fails to convert them.

library(impactr)

# install_accdata()
d <- import_dataset("daily_acc_3d")
# Make the data smaller to the code run faster
d <- define_region(
  d,
  start_time = "2016-01-20 00:01:00",
  end_time = "2016-01-20 23:59:59"
)
# Force the filename to have some special characters
attributes(d)$filename <- "Sáv"
invisible(remove_nonwear(d, save_plot = tempfile(fileext = ".pdf")))
#> Warning in title(...): conversion failure on 'Sáv' in 'mbcsToSbcs': dot
#> substituted for <cc>
#> Warning in title(...): conversion failure on 'Sáv' in 'mbcsToSbcs': dot
#> substituted for <81>
#> Warning in title(...): conversion failure on 'Sáv' in 'mbcsToSbcs': dot
#> substituted for <cc>
#> Warning in title(...): conversion failure on 'Sáv' in 'mbcsToSbcs': dot
#> substituted for <81>

Created on 2022-01-20 by the reprex package (v2.0.1)

Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value                       
#>  version  R version 4.1.2 (2021-11-01)
#>  os       macOS Big Sur 10.16         
#>  system   x86_64, darwin17.0          
#>  ui       X11                         
#>  language (EN)                        
#>  collate  en_GB.UTF-8                 
#>  ctype    en_GB.UTF-8                 
#>  tz       Europe/Lisbon               
#>  date     2022-01-20                  
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version date       lib source        
#>  accdata       0.1.0   2022-01-14 [1] local         
#>  backports     1.2.1   2020-12-09 [1] CRAN (R 4.1.0)
#>  cli           3.1.0   2021-10-27 [1] CRAN (R 4.1.0)
#>  crayon        1.4.2   2021-10-29 [1] CRAN (R 4.1.0)
#>  digest        0.6.29  2021-12-01 [1] CRAN (R 4.1.0)
#>  ellipsis      0.3.2   2021-04-29 [1] CRAN (R 4.1.0)
#>  evaluate      0.14    2019-05-28 [1] CRAN (R 4.1.0)
#>  fansi         0.5.0   2021-05-25 [1] CRAN (R 4.1.0)
#>  fastmap       1.1.0   2021-01-25 [1] CRAN (R 4.1.0)
#>  fs            1.5.2   2021-12-08 [1] CRAN (R 4.1.0)
#>  generics      0.1.1   2021-10-25 [1] CRAN (R 4.1.1)
#>  glue          1.6.0   2021-12-17 [1] CRAN (R 4.1.0)
#>  highr         0.9     2021-04-16 [1] CRAN (R 4.1.0)
#>  htmltools     0.5.2   2021-08-25 [1] CRAN (R 4.1.0)
#>  impactr     * 0.4.0   2022-01-16 [1] CRAN (R 4.1.2)
#>  knitr         1.36    2021-09-29 [1] CRAN (R 4.1.0)
#>  lifecycle     1.0.1   2021-09-24 [1] CRAN (R 4.1.0)
#>  lubridate     1.8.0   2021-10-07 [1] CRAN (R 4.1.0)
#>  lvmisc        0.1.1   2021-04-05 [1] CRAN (R 4.1.0)
#>  magrittr      2.0.1   2020-11-17 [1] CRAN (R 4.1.0)
#>  pillar        1.6.4   2021-10-18 [1] CRAN (R 4.1.0)
#>  pkgconfig     2.0.3   2019-09-22 [1] CRAN (R 4.1.0)
#>  purrr         0.3.4   2020-04-17 [1] CRAN (R 4.1.0)
#>  Rcpp          1.0.7   2021-07-07 [1] CRAN (R 4.1.0)
#>  reprex        2.0.1   2021-08-05 [1] CRAN (R 4.1.0)
#>  rlang         0.4.12  2021-10-18 [1] CRAN (R 4.1.0)
#>  rmarkdown     2.11    2021-09-14 [1] CRAN (R 4.1.0)
#>  rstudioapi    0.13    2020-11-12 [1] CRAN (R 4.1.0)
#>  sessioninfo   1.1.1   2018-11-05 [1] CRAN (R 4.1.0)
#>  stringi       1.7.6   2021-11-29 [1] CRAN (R 4.1.0)
#>  stringr       1.4.0   2019-02-10 [1] CRAN (R 4.1.0)
#>  styler        1.5.1   2021-07-13 [1] CRAN (R 4.1.0)
#>  tibble        3.1.6   2021-11-07 [1] CRAN (R 4.1.0)
#>  utf8          1.2.2   2021-07-24 [1] CRAN (R 4.1.0)
#>  vctrs         0.3.8   2021-04-29 [1] CRAN (R 4.1.0)
#>  withr         2.4.3   2021-11-30 [1] CRAN (R 4.1.0)
#>  xfun          0.27    2021-10-18 [1] CRAN (R 4.1.0)
#>  yaml          2.2.1   2020-02-01 [1] CRAN (R 4.1.0)
#> 
#> [1] /Library/Frameworks/R.framework/Versions/4.1/Resources/library

Test failure with the development version of tibble

It looks like the tests in this package are sensitive to the order of the attributes() in a tibble object, which has changed in tibble 3.1.4. Can you please confirm?

testthat::expect_equal() and testthat::expect_identical() handle this case automatically, but must be applied on the entire object.

testthat::expect_equal(
  attributes(structure(list(), a = 1, b = 2)),
  attributes(structure(list(), b = 2, a = 1))
)
#> Error: attributes(structure(list(), a = 1, b = 2)) not equal to attributes(structure(list(), b = 2, a = 1)).
#> Names: 2 string mismatches
#> Component 1: Mean relative difference: 1
#> Component 2: Mean relative difference: 0.5
testthat::expect_equal(
  structure(list(), a = 1, b = 2),
  structure(list(), b = 2, a = 1)
)

Created on 2021-08-15 by the reprex package (v2.0.1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.