From e509a5111c0e726429be297fa99c7cc4276c3de7 Mon Sep 17 00:00:00 2001
From: Xinting <xinting.yu@bwh.harvard.edu>
Date: Mon, 8 Nov 2021 13:24:29 -0500
Subject: [PATCH] Update GGIR codes

---
 .Rhistory               | 22 ++++++++++++++++++++++
 R/GGIR shell 11022021.R | 24 ++++++++++++++++++------
 2 files changed, 40 insertions(+), 6 deletions(-)
 create mode 100644 .Rhistory

diff --git a/.Rhistory b/.Rhistory
new file mode 100644
index 0000000..489a1b1
--- /dev/null
+++ b/.Rhistory
@@ -0,0 +1,22 @@
+library("haven")
+install.packages("haven")
+library("GGIR")
+install.packages("GGIR")
+install.packages("tidyverse")
+library("summarytools")
+install.packages("summarytools")
+library("mmap")
+library("bitops")
+library("matlab")
+library("signal")
+library("tuneR")
+library("zoo")
+library("data.table")
+library("GGIR")
+library("haven")
+library("tidyverse")
+library("summarytools")
+library("rmarkdown")
+r version
+rversion
+R.version
diff --git a/R/GGIR shell 11022021.R b/R/GGIR shell 11022021.R
index 52dd783..2652038 100644
--- a/R/GGIR shell 11022021.R	
+++ b/R/GGIR shell 11022021.R	
@@ -18,8 +18,10 @@
 ##
 ## SRI -sleep regulatory index is included in the outputs. 
 ## Part 4 - sleep diary analysis has not been included yet. -11/2/2021
+## 
 ##
-## ---------------------------
+#=============================================================================================
+## SECTION 1  GET READY FOR GGIR SHELL
 
 
 library("mmap") 
@@ -29,14 +31,20 @@ library("signal")
 library("tuneR") 
 library("zoo") 
 library("data.table") 
-library ("GGIR")
-library ("rmarkdown")
-#=============================================================================================
-#INPUT NEEDED FROM USER -for GGIR
+library("GGIR")
+library("haven")
+library("tidyverse")
+library("summarytools")
+library("rmarkdown")
+
+# SECTION 1: INPUT NEEDED FROM USER -for GGIR
 f0 = 1 # file index to start with if used in serial analyses; Index refers to the filenames sorted in increasing order
 f1 = 2 # file to end with if used in serial analyses (modify accordingly, if infinite then it will process until last file)
 mode= c(1,2,3,4,5) # what part of the analysis needs to be done (options: 1,2,3,4 and 5) e.g. if you want to run g.part1 it should be mode=c(1)
+datadir= "//rfawin/bwh-sleepepi-home/users/xy089/geneactiv-examples"
+outputdir ="//rfawin/bwh-sleepepi-home/users/xy089/outputs"
 #=============================================================================================
+# SECTION 2: GGIR SHELL
 g.shell.GGIR ( #----------------------------
                # General parameters:
                #----------------------------
@@ -309,7 +317,11 @@ g.shell.GGIR ( #----------------------------
                
 ## End of GGIR (Not run)
 
-    
+# SECTION 3 SLEEP FRAGMENTATION INDEX CALCULATION
+
+# SECTION 4 CODEBOOK GENERATION
+
+
               
               
 
-- 
GitLab