Code Monkey home page Code Monkey logo

Comments (8)

Mirkes avatar Mirkes commented on May 28, 2024

Dear John,

I'll analyse this problem ASAP. Unfortunately this week is completely busy.

Best regards,
Evgeny

from ggir.

Mirkes avatar Mirkes commented on May 28, 2024

Dear John,

Many thanks for your message. Now problem with reading of files is fixed. New version of g.cwaread is uploaded to github.

Best regards,
Evgeny

from ggir.

vincentvanhees avatar vincentvanhees commented on May 28, 2024

thanks Evgeny and John, I aim to get a new release of GGIR uploaded to CRAN in the upcoming days

from ggir.

muschellij2 avatar muschellij2 commented on May 28, 2024

This worked for a bit, but now tz issues. The configtz = c() default is likely going to fail, because this is getting passed to strptime:

zipfile = tempfile(fileext=".zip")
download.file("http://biobank.ndph.ox.ac.uk/showcase/showcase/examples/accsamp.zip", 
              destfile=zipfile)
fname = unzip(zipfile, files = "accsamp.cwa", exdir = tempdir())

library(GGIR)
# x = g.cwaread("accsamp.cwa", progressBar=TRUE, end = Inf)
x = g.cwaread(fname, progressBar=TRUE, end = 1000, configtz = "")
#> |======================================================================| 100%
x = g.cwaread(fname, progressBar=TRUE, end = 1000)
#> Error in strptime(xx, f, tz = tz): invalid 'tz' value

Created on 2020-02-18 by the reprex package (v0.3.0.9001)

Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value                       
#>  version  R version 3.6.2 (2019-12-12)
#>  os       macOS Mojave 10.14.6        
#>  system   x86_64, darwin15.6.0        
#>  ui       X11                         
#>  language (EN)                        
#>  collate  en_US.UTF-8                 
#>  ctype    en_US.UTF-8                 
#>  tz       America/New_York            
#>  date     2020-02-18                  
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version     date       lib source                             
#>  assertthat    0.2.1       2019-03-21 [1] CRAN (R 3.6.0)                     
#>  backports     1.1.5       2019-10-02 [1] CRAN (R 3.6.0)                     
#>  cli           2.0.1       2020-01-08 [1] CRAN (R 3.6.0)                     
#>  crayon        1.3.4       2017-09-16 [1] CRAN (R 3.6.0)                     
#>  data.table    1.12.8      2019-12-09 [1] CRAN (R 3.6.0)                     
#>  digest        0.6.23      2019-11-23 [1] CRAN (R 3.6.0)                     
#>  evaluate      0.14        2019-05-28 [1] CRAN (R 3.6.0)                     
#>  fansi         0.4.1       2020-01-08 [1] CRAN (R 3.6.0)                     
#>  fs            1.3.1       2019-05-06 [1] CRAN (R 3.6.0)                     
#>  GGIR        * 1.10-4      2019-09-09 [1] CRAN (R 3.6.0)                     
#>  glue          1.3.1       2019-03-12 [1] CRAN (R 3.6.0)                     
#>  highr         0.8         2019-03-20 [1] CRAN (R 3.6.0)                     
#>  htmltools     0.4.0       2019-10-04 [1] CRAN (R 3.6.0)                     
#>  knitr         1.26.1      2020-01-05 [1] Github (muschellij2/knitr@f5af631) 
#>  magrittr      1.5         2014-11-22 [1] CRAN (R 3.6.0)                     
#>  pillar        1.4.3       2019-12-20 [1] CRAN (R 3.6.0)                     
#>  pkgconfig     2.0.3       2019-09-22 [1] CRAN (R 3.6.0)                     
#>  purrr         0.3.3       2019-10-18 [1] CRAN (R 3.6.0)                     
#>  Rcpp          1.0.3       2019-11-08 [1] CRAN (R 3.6.2)                     
#>  reprex        0.3.0.9001  2020-01-05 [1] Github (tidyverse/reprex@5ae0b29)  
#>  rlang         0.4.2       2019-11-23 [1] CRAN (R 3.6.0)                     
#>  rmarkdown     2.0.7       2020-01-17 [1] Github (rstudio/rmarkdown@2faf16a) 
#>  rstudioapi    0.10.0-9003 2020-01-05 [1] Github (rstudio/rstudioapi@abe596d)
#>  sessioninfo   1.1.1       2018-11-05 [1] CRAN (R 3.6.0)                     
#>  stringi       1.4.5       2020-01-11 [1] CRAN (R 3.6.0)                     
#>  stringr       1.4.0       2019-02-10 [1] CRAN (R 3.6.0)                     
#>  styler        1.1.1       2019-05-06 [1] CRAN (R 3.6.0)                     
#>  tibble        2.1.3       2019-06-06 [1] CRAN (R 3.6.0)                     
#>  withr         2.1.2       2018-03-15 [1] CRAN (R 3.6.0)                     
#>  xfun          0.11        2019-11-12 [1] CRAN (R 3.6.0)                     
#>  yaml          2.2.0       2018-07-25 [1] CRAN (R 3.6.0)                     
#> 
#> [1] /Library/Frameworks/R.framework/Versions/3.6/Resources/library

from ggir.

vincentvanhees avatar vincentvanhees commented on May 28, 2024

Hi John,
You should use "desiredtz" argument to specify timezone if the accelerometers were set up in the same timezone as in which the recording took place.

The configtz is new since last year and it currently only works for AX3 cwa data.
It allows users to configure their accelerometers in one timezone, send them to a study participant in another timezone. I have tested this with a client who had to deal with such situation, so it should work.

desiredtz = timezone of data collection
configtz = timezone were accelerometer was configured

from ggir.

vincentvanhees avatar vincentvanhees commented on May 28, 2024

Note that if (length(configtz) == 0) configtz = desiredtz at the top of g.cwaread handles configtz = c()

Edit: Also note that g.cwaread does not have a default value for argument desiredtz, so you will have to provide that explicitly.

from ggir.

muschellij2 avatar muschellij2 commented on May 28, 2024

from ggir.

vincentvanhees avatar vincentvanhees commented on May 28, 2024

thanks John, I agree. Would be good to get that checked and fixed. I have opened a new issue for it.

from ggir.

Related Issues (20)

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.