CSV Data Format

130 views
Skip to first unread message

Martin Pan

unread,
Jul 24, 2020, 10:04:33 AM7/24/20
to R package GGIR
Hello, 

I am new to the field and GGIR seems to be a great package! I have some questions about the csv data format. I have noticed the discussion for sample csv in here. However, I have few questions related to this sample file:

1. My ppg data has number that is outside -1 and 1 range? Should I normalize the data to make the ppg data in [-1,1]?
2. What is the meaning of Epoch Period in the sample csv? 
3. How to include id in the csv file?
4. If I know when the user does not wear the device, is there a way to let the GGIR package know the user does not wear device in a specific time?
5. I have ppg data from following days: 06.01, 06.02, 06.04, 06.05.(mm.dd) Should I merge all the ppg data into one csv file or use them separately?

Thanks!
Best,
Martin 

Vincent van Hees

unread,
Jul 29, 2020, 2:17:03 PM7/29/20
to Martin Pan, R package GGIR
Hi Martin,

It is probably easier for you to explore the read.myacc.csv functionality which allows you to tailor GGIR to your own csv file format. Jairo has been working on vignette for this function, but hopefully the standard package documentation can help you for now. Also the unit tests with artificial data should be helpful to get you started.

See my responses to your questions in capital letters below.


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday 24 July 2020 16:04, Martin Pan <wpa...@email.wm.edu> wrote:

Hello, 

I am new to the field and GGIR seems to be a great package! I have some questions about the csv data format. I have noticed the discussion for sample csv in here. However, I have few questions related to this sample file:

1. My ppg data has number that is outside -1 and 1 range? Should I normalize the data to make the ppg data in [-1,1]?
GGIR DOES NOET HANDLE PPG, ONLY ACCELEROMETER DATA.
2. What is the meaning of Epoch Period in the sample csv? 
IF YOU USE FUNCTION READ.MYACC.CSV THIS IS NOT RELEVANT
3. How to include id in the csv file?
IF YOU USE FUNCTION READ.MYACC.CSV YOU CAN SPECIFY THE ID NUMBER IN THE FILE HEADER
4. If I know when the user does not wear the device, is there a way to let the GGIR package know the user does not wear device in a specific time?
YES, IF YOU USE FUNCTION READ.MYACC.CSV THERE IS AN OPTION TO PROVIDE EXTERNALLY DERIVED NON-WEAR SCORE WHICH WILL BE TAKEN OVER BY GGIR AND OVERRULES GGIR'S DEFAULT NONWEAR ALGORITHM
5. I have ppg data from following days: 06.01, 06.02, 06.04, 06.05.(mm.dd) Should I merge all the ppg data into one csv file or use them separately?
GGIR DOES NOT PROCESS PPG DATA, ONLY ACCELEROMETER DATA.
Thanks!
Best,
Martin 


--
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.

Martin Pan

unread,
Jul 29, 2020, 5:33:35 PM7/29/20
to R package GGIR
Hello Vincent,

Thank you so much with the suggestions! I am actually working with acc data and so GGIR works for me. Just a quick followup, I am wondering how to incorporate the result of read.myacc.csv into the g.shell.GGIR function? In other words, if I have load_data <- read.myacc.csv(...), how should put this load_data variable into the g.shell.GGIR function?

Thanks!
Best,
Martin

Vincent van Hees

unread,
Jul 30, 2020, 7:50:56 AM7/30/20
to Martin Pan, R package GGIR
You will need to provide the function arguments that you used for the read.myacc.csv function to the g.shell.GGIR function. So, you will not be interacting with read.myacc.csv directly. Trying it out on example data is only useful to check that you are using the right function arguments.
Best, Vincent

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

Martin Pan

unread,
Aug 3, 2020, 9:46:32 PM8/3/20
to R package GGIR

Hello Vincent,

Thanks for the suggestions! However, the current documentation for g.shell.GGIR does not provide information about how to incorporate the read.myacc.csv function. Is it possible for you to provide a sample of g.shell.GGIR function with the read.myacc.csv arguments? I am confused about how to make the rmc.file compatible with the datadir argument.

Also, is there a way to make the rmc.nrow automatically equal to all rows in the csv? The current implementation of read.myacc.csv seems to require input for this argument(rmc.nrow). 

Best,
Martin 

Vincent van Hees

unread,
Sep 7, 2020, 4:21:18 AM9/7/20
to Martin Pan, R package GGIR
The argument you provide to read.myacc.csv can be provided to the g.shell.GGIR function. The rmc.nrow argument is not used, even if you provide it because g.part1 decides how many rows of data it needs to read. Function g.shell.GGIR takes all arguments that all other functions of the GGIR package take, but to avoid double documentation I only document them where they are used.

As I said Jairo is drafting a vignette around this. His current version is here.

Vincent



‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

Reply all
Reply to author
Forward
0 new messages