Skip to content

Commit

Permalink
prepare for new release to fix CRAN errors
Browse files Browse the repository at this point in the history
  • Loading branch information
msuchard committed Oct 30, 2023
1 parent 9fc5b31 commit 78646f0
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 23 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: Cyclops
Type: Package
Title: Cyclic Coordinate Descent for Logistic, Poisson and Survival Analysis
Version: 3.3.1.99
Version: 3.3.1.999
Authors@R: c(
person("Marc A.", "Suchard", email = "[email protected]", role = c("aut","cre")),
person("Martijn J.", "Schuemie", role = "aut"),
Expand Down Expand Up @@ -30,7 +30,7 @@ Biarch: true
URL: https://github.com/ohdsi/cyclops
BugReports: https://github.com/ohdsi/cyclops/issues
Depends:
R (>= 3.1.0)
R (>= 3.5.0)
Imports:
rlang,
Matrix,
Expand Down
15 changes: 9 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
develop
Cyclops v3.4.0
==============

Changes:

1. improvements on adaptive likelihood profiling
2. add `auto` option to `cvRepetitions`
3. bumped explicit C++11 requirement up to R v4.1
1. remove dependence on `BH`
2. improvements on adaptive likelihood profiling
3. add `auto` option to `cvRepetitions`
4. bumped explicit C++11 requirement up to R v4.1
5. removed deprecated use of `dbplyr:::$.tbl_lazy`
a. breaking change in `dbplyr v2.4.0`

Cyclops v3.3.1
==============

Changes:

1. fix uninitialized value in detected in computeAsymptoticPrecisionMatrix(); value was priorType
2. fix memory leak caused by call to ::Rf_error()
1. fix uninitialized value in detected in `computeAsymptoticPrecisionMatrix()`; value was priorType
2. fix memory leak caused by call to `::Rf_error()`
3. fix line-endings on Makevar on windows

Cyclops v3.3.0
Expand Down
4 changes: 2 additions & 2 deletions R/DataManagement.R
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@ reduce <- function(object, covariates, groupBy, power = 1) {
#' \code{appendSqlCyclopsData} appends data to an OHDSI data object.
#'
#' @details Append data using two tables. The outcomes table is dense and contains ... The covariates table is sparse and contains ...
#' All entries in the outcome table must be sorted in increasing order by {oStratumId, oRowId}. All entries in the covariate table
#' must be sorted in increasing order by {cRowId}. Each cRowId value must match exactly one oRowId value.
#' All entries in the outcome table must be sorted in increasing order by (oStratumId, oRowId). All entries in the covariate table
#' must be sorted in increasing order by (cRowId). Each cRowId value must match exactly one oRowId value.
#'
#' @param object OHDSI Cyclops data object to append entries
#' @param oStratumId Integer vector (optional): non-unique stratum identifier for each row in outcomes table
Expand Down
2 changes: 1 addition & 1 deletion R/NewDataConversion.R
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ convertToCyclopsData.tbl_dbi <- function(outcomes,
}

if (modelType == "pr" | modelType == "cpr") {
if (any(outcomes$time <= 0)) {
if (any(pull(outcomes, .data$time) <= 0)) {
stop("time cannot be non-positive", call. = FALSE)
}
}
Expand Down
19 changes: 10 additions & 9 deletions R/TimeEffects.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ splitTime <- function(shortOut, cut) {
if (!"y" %in% colnames(shortOut)) stop("Must provide observed event status.")
if ("rowId" %in% colnames(shortOut)) {
shortOut <- shortOut %>%
rename(subjectId = rowId) %>%
arrange(subjectId)
rename(subjectId = .data$rowId) %>%
arrange(.data$subjectId)
} else {
shortOut <- shortOut %>%
mutate(subjectId = row_number())
Expand All @@ -36,10 +36,10 @@ splitTime <- function(shortOut, cut) {
episode = "stratumId",
id = "newSubjectId"))
longOut <- longOut %>%
rename(y = event) %>%
mutate(time = tstop - tstart) %>%
select(-c(newSubjectId, tstart, tstop)) %>%
arrange(stratumId, subjectId)
rename(y = .data$event) %>%
mutate(time = .data$tstop - .data$tstart) %>%
select(-c(.data$newSubjectId, .data$tstart, .data$tstop)) %>%
arrange(.data$stratumId, .data$subjectId)

# Restore rowIds
SubjectIds <- shortOut$subjectId
Expand All @@ -49,9 +49,10 @@ splitTime <- function(shortOut, cut) {

# Reorder columns
longOut <- longOut %>%
select(rowId, everything()) %>%
select(subjectId, everything()) %>%
select(stratumId, everything())
select(.data$stratumId, .data$subjectId, .data$rowId, everything())
# select(.data$rowId, everything()) %>%
# select(.data$subjectId, everything()) %>%
# select(.data$stratumId, everything())

return(longOut)
}
Expand Down
4 changes: 2 additions & 2 deletions man/appendSqlCyclopsData.Rd

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

9 changes: 8 additions & 1 deletion src/cyclops/Iterators.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@ namespace bsccs {
*/

template <typename T>
class IncrementableIterator : public std::iterator<std::input_iterator_tag, T> {
class IncrementableIterator {
public:

using iterator_category = std::forward_iterator_tag;
using value_type = T;
using difference_type = T;
using pointer = T*;
using reference = T&;

IncrementableIterator(T value) : value(value) { }

IncrementableIterator& operator++() {
Expand Down
1 change: 1 addition & 0 deletions src/cyclops/drivers/AbstractCrossValidationDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <numeric>
#include <cmath>
#include <iterator>

// #include "boost/iterator/counting_iterator.hpp"

Expand Down

0 comments on commit 78646f0

Please sign in to comment.