verasls / impactr Goto Github PK
View Code? Open in Web Editor NEW{impactr} Mechanical loading prediction through accelerometer data
Home Page: https://lveras.com/impactr/
License: Other
{impactr} Mechanical loading prediction through accelerometer data
Home Page: https://lveras.com/impactr/
License: Other
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)
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)
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.