From 46fb882320947e70550504c62d7f177a17ecd97b Mon Sep 17 00:00:00 2001 From: dafnevk Date: Wed, 10 May 2017 15:52:16 +0200 Subject: [PATCH] There were some small errors in step2 --- step1_applyGGIR.R | 6 +++--- step2_convert2csv.R | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/step1_applyGGIR.R b/step1_applyGGIR.R index 2d795b4..87a10b3 100755 --- a/step1_applyGGIR.R +++ b/step1_applyGGIR.R @@ -11,11 +11,11 @@ library(GGIR) f0 = 1 #c() #file to start with if used in serial analyses f1 = 10 # c() #file to end with if used in serial analyses (modify accordingly, if infinite then it will process until last file) mode= c(1,2) #What part of the analysis needs to be done (options: 1,2,3,4 and 5) -datadir = "/media/windows-share/London/data_spring2017/output_RDAfiles/raw" #Where is the raw accelerometer data? (leave as c() if you work with milestone data and mode > 1 +datadir = "/media/sf_VBox_Shared/London/run_05-10/raw" #Where is the raw accelerometer data? (leave as c() if you work with milestone data and mode > 1 dayborder = 4 -outputdir = "/media/windows-share/London/data_spring2017/" #Name directory where output needs to be stored +outputdir = "/media/sf_VBox_Shared/London/run_05-10/" #Name directory where output needs to be stored studyname = "RDAfiles" #name of study, only needed if datadir is a list of filenames -selectdaysfile = "/media/windows-share/London/data_spring2017/wearcodes_2017May2.csv" +selectdaysfile = "/media/sf_VBox_Shared/London/run_05-10/wearcodes.csv" #===================================================================================== # load functions from functions folder (replace by require(GGIR) once package is updated) diff --git a/step2_convert2csv.R b/step2_convert2csv.R index a83f77d..fcc1f68 100755 --- a/step2_convert2csv.R +++ b/step2_convert2csv.R @@ -6,7 +6,7 @@ graphics.off() # INPUT NEEDED: # setwd("D:/sharedfolder/first5") #<= the folder in which there is a folder named output_... # setwd("D:/dropbox/Dropbox/Accelerometry/GGIR/development") #<= the folder in which there is a folder named output_... -path = "/media/windows-share/London/data_spring2017" +path = "/media/sf_VBox_Shared/London/run_05-10/" setwd(path) studyname = "RDAfiles" exportrawdata = FALSE @@ -16,10 +16,10 @@ library(GGIR) # Define output directories: outdir = "accelerometer_5second" # epoch data newdir = paste0(path,"/output_",studyname,"/",outdir) -if (dir.exists(newdir) == FALSE) dir.create(newdir) +if (file.exists(newdir) == FALSE) dir.create(newdir) -ufn = unique(dir(paste0(path,"/output_",studyname,"/raw"))) # Define which files need to beprocessed: +ufn = unique(dir(paste0(path,"/output_",studyname,"/meta/ms2.out"))) # Define which files need to beprocessed: # Alternatively, only use data from files for which there is a corresponding diary: # ann = read.csv("D:/dropbox/Dropbox/Accelerometry/GGIR/development/input_cls/data_annotations.csv") # ufn = as.character(unique(ann$filename))