Error in if (dformat == 1) { : argument is of length zero

130 views
Skip to first unread message

Karteek Pradyumna Bulusu

unread,
Jun 21, 2016, 9:57:01 AM6/21/16
to R package GGIR
Hey all,
I am new to this field and was keen to know GGIR working. While trying it over my CSV file which was accelerometer, gyroscope and magnetometer reading, I am getting following error.
This might look stupid but since I am beginner, I would just take some help.

Code:

df <- read.table(file = "sas16-challenge.csv", header = TRUE, sep = ",")

library(GGIR)

data(data.getmeta)
data("data.inspectfile")
data("data.calibrate")

i = g.inspectfile(df)

Error:
> i = g.inspectfile(df)
Error in if (dformat == 1) { : argument is of length zero

Thanks guys,
Best
Karteek.

Vincent van Hees

unread,
Jun 28, 2016, 2:59:17 PM6/28/16
to Karteek Pradyumna Bulusu, R package GGIR
Hi Karteek,

1. GGIR is can only deal with files in specific formats as explained in the tutorial. See an example csv-file attached. You will need to adapt your own data to fit with this format. GGIR is not designed to handle gyroscope or magnetometer data, so please omit those from your data.
2. Your function input should be a path to a file as shown in the function documentation, e.g. g.inspecfile("C:/yourdir/yourfile.csv"), and not a dataframe.

Best wishes,

Vincent

--
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.
To post to this group, send email to Rpacka...@googlegroups.com.
Visit this group at https://groups.google.com/group/RpackageGGIR.
To view this discussion on the web, visit https://groups.google.com/d/msgid/RpackageGGIR/36b5984c-b972-474b-b6e1-0b0ef80b8a56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Actigraph_example.csv
Reply all
Reply to author
Forward
0 new messages