Issues with passing read.myacc.csv arguments to g.shell

198 views
Skip to first unread message

ekle...@gmail.com

unread,
May 6, 2021, 11:27:56 AM5/6/21
to R package GGIR

Hi Vincent-

I hope all is well! I’m having an issue when trying to pass any arguments from read.myacc.csv to g.shell (which I think others are having as well). 

Specifically, any CSV data I’m using (with or without header, etc.) works fine in read.myacc.csv. But, when I pass any arguments to g.shell, I get one of two errors at the first step. 


Here is the most basic code I’m using:


g.shell.GGIR(rmc.firstrow.acc = 1,

             rmc.col.acc = 2:4,

             rmc.col.temp = 5,

             rmc.col.time=1,

             rmc.unit.acc = "g",

             rmc.unit.temp = "C",

             rmc.unit.time = "POSIX",

             rmc.format.time = "%Y-%m-%d %H:%M:%OS",

             rmc.bitrate = c(),

             rmc.origin = "1970-01-01",

             rmc.desiredtz = "America/New_York",

             rmc.col.wear = c(),

             rmc.doresample=FALSE,

             mode=c(1),

             datadir=info.save.path,

             outputdir=path.output,

             #do.report=c(2,4,5),

             studyname = "test",

             overwrite = FALSE,

             rmc.sf=32)


When I run this code, I get this error:


[1] "object 'temperaturecolumn' not found"


I’m not sure what’s causing the error. But, when I set   rmc.col.temp to the default (  rmc.col.temp = c()). I no longer get the error, but instead get this:  


[1] "replacement has length zero"


$call

data_processed[which(is.na(data_processed[, j]) == T), j] <- data_processed[p1[length(p1)], 

    j]


I’ve actually never been able to get any generic csv data (beyond the tests we ran on small files in 2019) to work with GGIR, so I wonder if it’s a low-level bug with something being named incorrectly, etc. 


Is there something simple I’m missing? I’m happy to adapt any helper functions to create CSV files that work better with GGIR.


Thanks! 


Evan

Vincent van Hees

unread,
May 9, 2021, 12:49:09 PM5/9/21
to ekle...@gmail.com, R package GGIR
Hi Evan,

Thanks for reaching out. I made some improvement to this functionality in March and April, which are part of the GGIR master branch on GitHub (release 2.3-1 and 2.3-2), but not part of the GGIR version on CRAN yet (2.3-0).

Would you mind trying to see whether your issue is resolved when in the GitHub version?

install.packages("remotes")
remotes::install_github("wadpac/GGIR")
library("GGIR")

Thanks,
Vincent


Dr. Vincent van Hees
Independent consultant

ACCELTING.png



‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
--
You received this message because you are subscribed to the Google Groups "R package GGIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to RpackageGGIR...@googlegroups.com.

ekle...@gmail.com

unread,
May 10, 2021, 9:54:07 AM5/10/21
to R package GGIR
Hi Vincent-

Good to hear from you! I ran the code on the updated GGIR and got this error:

Report part 2
 1Error in data.frame(filename = fnames[i], file.corrupt = M$filecorrupt,  : 
  object 'deviceSerialNumber' not found

Is there a way to pass this information in when using read.myacc.csv via g.shell? 

I know this information is in the csv file when using a header (which I'm not doing in this example). When I do use the header export from E4tools, I get a slew of different errors, but can continue to investigate using the header instead of the "no header" option.

Thanks!

Evan

Grace Bailey

unread,
Sep 7, 2021, 10:03:26 AM9/7/21
to R package GGIR
Hi Evan,

Did you have any luck with this? I've encountered similar issues when trying to run my csv files.

Grace

Reply all
Reply to author
Forward
0 new messages