Skipping files that are too small for analysis or list object cannot be coerced to type doble

75 views
Skip to first unread message

Mª Purificación Ballester Navarro

unread,
Mar 22, 2024, 11:18:55 AM3/22/24
to R package GGIR
Hi! TY in advance for the help 

I am trying to analyze a unique .csv file that contains proper code for 8 nights with the following code. Is attached to this message as well. 

GGIR(
  mode=c(1,2,3,4,5),
  datadir="//hersheymed.net/files/psychiatry/Research/Sleep/Faculty/Mendoza/Teaching/Postdoctoral Fellows/Ballester Navarro, Pura/Datasets/PSCC/Test-Data/Data",
  outputdir="//hersheymed.net/files/psychiatry/Research/Sleep/Faculty/Mendoza/Teaching/Postdoctoral Fellows/Ballester Navarro, Pura/Datasets/PSCC/Test-Data/Output",
  do.report=c(2,4,5),
  #=====================
  # read.myacc.csv arguments
  #=====================
  rmc.nrow=Inf, rmc.skip = c(0), rmc.dec=".",
  rmc.firstrow.acc = c(12), rmc.firstrow.header=c(11),
  rmc.header.length = c(9),
  rmc.col.acc = 2:4,
  rmc.col.time=c(),
  rmc.unit.acc = "g",
  rmc.unit.time = "POSIX",
  rmc.format.time = "%H:%M:%OS",
  rmc.bitrate = c(), rmc.dynamic_range = c(),
  rmc.unsignedbit = TRUE,
  rmc.origin = "1970-01-01",
  rmc.desiredtz = NULL,
  rmc.configtz = NULL,
  rmc.sf = c(),
  rmc.headername.sf = c(),
  rmc.headername.sn = c(),
  rmc.headername.recordingid = c(),
  rmc.header.structure = c(),
  rmc.check4timegaps = FALSE,
  rmc.col.wear = c(),
  rmc.doresample = FALSE,
  rmc.scalefactor.acc = 1,
  interpolationType=1,
  PreviousLastValue = c(0, 0, 1),
  PreviousLastTime = NULL,
  desiredtz = "US/Pennsylvania",
  configtz = "US/Pennsylvania",
  header = NULL)

and I am getting the following error message 

Error: No files to analyse. Check that there are accelerometer files in the directory specified with argument datadir In addition: Warning message: Skipping files that are too small for analysis: V2 60secDataTable.csv (configurable with parameter minimumFileSizeMB).

NOTE: File is valid, is in the datadir folder, and is the unique file there.

when I try with this code (see bellow), that contains a chunk of code that actually opens the .csv file, there is also an error message popping up.

GGIR(
  mode=c(1,2,3,4,5),
  datadir="//hersheymed.net/files/psychiatry/Research/Sleep/Faculty/Mendoza/Teaching/Postdoctoral Fellows/Ballester Navarro, Pura/Datasets/PSCC/Test-Data/Data",
  outputdir="//hersheymed.net/files/psychiatry/Research/Sleep/Faculty/Mendoza/Teaching/Postdoctoral Fellows/Ballester Navarro, Pura/Datasets/PSCC/Test-Data/Output",
  do.report=c(2,4,5), parametersVignette (minimumFileSizeMB=0.01),
read.myacc.csv(rmc.file=c("//hersheymed.net/files/psychiatry/Research/Sleep/Faculty/Mendoza/Teaching/Postdoctoral Fellows/Ballester Navarro, Pura/Datasets/PSCC/Test-Data/Data/V2 60secDataTable.csv"), rmc.nrow=Inf, rmc.skip = c(0), rmc.dec=".",
               rmc.firstrow.acc = c(12), rmc.firstrow.header=c(11),
               rmc.header.length = c(9),
               rmc.col.acc = 2:4,
               rmc.col.time=c(),
               rmc.unit.acc = "g",
               rmc.unit.time = "POSIX",
               rmc.format.time = "%H:%M:%OS",
               rmc.bitrate = c(), rmc.dynamic_range = c(),
               rmc.unsignedbit = TRUE,
               rmc.origin = "1970-01-01",
               rmc.desiredtz = NULL,
               rmc.configtz = NULL,
               rmc.sf = c(),
               rmc.headername.sf = c(),
               rmc.headername.sn = c(),
               rmc.headername.recordingid = c(),
               rmc.header.structure = c(),
               rmc.check4timegaps = FALSE,
               rmc.col.wear = c(),
               rmc.doresample = FALSE,
               rmc.scalefactor.acc = 1,
               interpolationType=1,
               PreviousLastValue = c(0, 0, 1),
               PreviousLastTime = NULL,
               desiredtz = "US/Pennsylvania",
               configtz = "US/Pennsylvania",
               header = NULL))

Checking that user has write access permission for directory specified by argument outputdir: Yes Error in GGIR(mode = c(1, 2, 3, 4, 5), datadir = "//hersheymed.net/files/psychiatry/Research/Sleep/Faculty/Mendoza/Teaching/Postdoctoral Fellows/Ballester Navarro, Pura/Datasets/PSCC/Test-Data/Data", : 'list' object cannot be coerced to type 'double'



V2 60secDataTable.csv

Lena Kushleyeva

unread,
Mar 22, 2024, 1:48:07 PM3/22/24
to R package GGIR
Hi!

Is there a reason why you are using "parametersVignette (minimumFileSizeMB=0.01)" instead of just setting minimumFileSizeMB?
Also, why did you add a call to read.myacc.csv() there, in the argument list?

try removing both of these things  you added:

parametersVignette (minimumFileSizeMB=0.01),
read.myacc.csv(rmc.file=c("//hersheymed.net/files/psychiatry/Research/Sleep/Faculty/Mendoza/Teaching/Postdoctoral Fellows/Ballester Navarro, Pura/Datasets/PSCC/Test-Data/Data/V2 60secDataTable.csv"),

and instead only add this:

minimumFileSizeMB=0.01,

hope this helps!

-Lena

Michael Rueschman

unread,
Mar 24, 2024, 9:44:21 PM3/24/24
to R package GGIR
Adding to Lena's comments: It appears you are trying to process an ActiGraph 60-second epoch CSV file (i.e., not raw accelerometry data). Do you have the raw data (e.g., a .gt3x file)? Those are likely easier to get running through GGIR than your 60-second epoch file (observations based on personal experience).

To use the 60-second epoch CSV file you will need to look at additional configuration parameters such as:

data_format = "actigraph_csv"
extEpochData_timeformat = "%m/%d/%Y %H:%M:%S"
(likely others)

References:
Best of luck!
Reply all
Reply to author
Forward
0 new messages