Skip to content

Commit

Permalink
Ready to submit
Browse files Browse the repository at this point in the history
  • Loading branch information
masiraji committed Jan 8, 2024
1 parent 6b4c1cf commit 212cf61
Show file tree
Hide file tree
Showing 34 changed files with 486 additions and 126 deletions.
31 changes: 13 additions & 18 deletions R/bedtime.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,17 @@
#'Calculates time spent in bed in hours. Output class is numeric.

#' @export
bedTime <- function(x,y)
{
bed <- x
wake <- y
wake <- paste(Sys.Date(), wake)
tmpbed <- paste(Sys.Date(), bed)
d <- apply(data.frame(tmpbed, wake), 1, function(x) difftime(x[2], x[1],
units = "hours"))
adjust <- -(d < 0)
tmpbed <- paste(Sys.Date()+adjust, bed)
apply(data.frame(tmpbed, wake), 1, function(x) difftime(x[2], x[1], units = "hours"))
}


bedTime <- function(x, y) {
if (is.na(x) | is.na(y)) {
warning("Either bedtime or waking time was NA. Hours in bed returned as NA")
return(NA)
} else if (grepl("[0-9][0-9]:[0-9][0-9]", x) | grepl("[0-9][0-9]:[0-9][0-9]", y)) {
bed <- x
wake <- y
wake <- paste(Sys.Date(), wake)
tmpbed <- paste(Sys.Date(), bed)
d <- apply(data.frame(tmpbed, wake), 1, function(x) difftime(x[2], x[1], units = "hours"))
adjust <- -(d < 0)
tmpbed <- paste(Sys.Date()+adjust, bed)
bed_hours <- apply(data.frame(tmpbed, wake), 1, function(x) difftime(x[2], x[1], units = "hours"))
return(bed_hours)
} else {
warning("Either bedtime or waking time is not a string variable, or is not formatted as 'hh:mm'")
return(NA)}
}
8 changes: 8 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## Resubmission 05 on 8 Jan 2024
This is the 5th resubmission. In this submission:
* I have removed extra spaces in lavaan syntaxs used in cfa.tab.multi.R and cfa.tab.R files.
R-CMD results indicated
* 0 errors, 0 warnings, 0 notes.



## Resubmission 04 on 30 Sep 2022
This is the 4th resubmission. In this submission:
* I have removed the acronyms from description file.
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/THANKS.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

152 changes: 76 additions & 76 deletions docs/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pandoc: '2.18'
pkgdown: 2.0.6
pandoc: 3.1.1
pkgdown: 2.0.7
pkgdown_sha: ~
articles: {}
last_built: 2022-10-04T12:49Z
last_built: 2024-01-08T15:33Z

2 changes: 1 addition & 1 deletion docs/reference/FFMQ.CFA.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/FFMQ.Val.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/Gantt.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/Rotter.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/Spot.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/bedTime.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/cfa.tab.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/cfa.tab.multi.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions docs/reference/des.tab.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/fac.tab.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added docs/reference/figures/irt2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/reference/ggicc.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/ggiteminfo.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/ggreliability.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

112 changes: 112 additions & 0 deletions docs/reference/ggreliability_plotly.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/ggtestinfo.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 212cf61

Please sign in to comment.