Closed tarensanders closed 5 months ago
It turns out this issue is unrelated to the problem I'm having with the converted data. I'm trying to follow these instructions, but I'm still getting an error about non-numeric-alike variable(s) which seems to occur in g.impute. I'm happy to keep digging my way through this, but if you happen to know what I'm doing wrong that would be great.
I'm running:
GGIR::GGIR(
mode = 1:2,
datadir = "/Users/tasanders/Downloads/Testfiles/CSV",
outputdir = "/Users/tasanders/Downloads/Testfiles/outdir",
dataFormat = "actigraph_csv",
windowsizes = c(1, 900, 3600), studyname = "test",
extEpochData_timeformat = "%m-%d-%Y %H:%M:%S",
do.neishabouricounts = TRUE, acc.metric = "NeishabouriCount_x",
HASPT.algo = "NotWorn", HASIB.algo = "NotWorn", overwrite = TRUE
)
Edit: Worked it out - M$metashort
has all of the data stored as characters rather than as numerics. Not sure if this is a problem with GGIR or with my conversion script, but at least it is simple to solve.
Hi Vincent,
I'm trying to work with some .agd files. I know that in the past GGIR hasn't supported non-raw formats, but it seems like GGIR now supports it (after converting to CSV, as you suggest in #981).
So I've written a script to convert agd to csv, but I'm running into problems during the imputation. Specifically:
The fact that there are two
NeishabouriCount_x
seems odd to me. Inspecting the part1 output confirms that this is how the metalong/metashort is created.So I went digging and found this section:
https://github.com/wadpac/GGIR/blob/5185b22364937ba95cefdb2af4430268b363dfea/R/convertEpochData.R#L286-L289
It seems like this is a mistake, and that this should instead be
"NeishabouriCount_vm"
as is referenced elsewhere.https://github.com/wadpac/GGIR/blob/5185b22364937ba95cefdb2af4430268b363dfea/R/g.analyse.perday.R#L392
This would only affect agd files where the vm is included in the output of the csv file. I'll open a PR with a fix for this for you to merge if you agree that this is a mistake.