yes v is visit in all of the different subject logs (e.g. sleep time log, wear log) that create the dataframe. Below are the instructions and code that I have been given to use if that is of any information to you
rm(list=ls())
Step 1 Load the activpalProcessing package and library
install.packages("activpalProcessing")
library(activpalProcessing)
Step 2 Insert the path to your working directory inside of the quotations
directory <- identifyDirectory("/Users/jsmith/Documents/PAI_Directory/")
Step 3 Load example logs
example.log.subjects <- log.subjects
example.log.bed <- log.bed
example.log.on.off <- log.on.off
Step 4 Export example logs as .csv files to your working directory. If the code below is used the logs will be named "template.log.subjects.csv", "template.log.bed.csv" and "template.log.on.off.csv" in your working directory.
write.table(example.log.subjects,file=paste(directory,"temp.log.subjects.csv",sep=""),row.names=F,col.names=T,sep=",")
write.table(example.log.bed,file=paste(directory,"temp.log.bed.csv",sep=""),row.names=F,col.names=T,sep=",")
write.table(example.log.on.off,file=paste(directory,"temp.log.on.off.csv",sep=""),row.names=F,col.names=T,sep=",")
Step 5 Open these templates and insert your data to create your own logs. Resave the files as .csv files as "log.subjects.csv", "log.bed.csv", and "log.on.off.csv", respectively.
Step 6 Use the function "process.AP" to loop through the AP events data in the specified working directory and estimate PA and SB variables for the given data set. There are 18 independent functions provided in the package activpalProcessing. These functions are used within the function "process.AP". These functions can also be used according the manual provided within this package. If a bed log and on/off log were not used, replace both "log.bed" and "log.on.off" with NULL (no quotations)
process.AP(directory,name.of.log.subjects="log.subjects",name.of.log.bed="log.bed",name.of.log.on.off="log.on.off")