File tree 4 files changed +8
-4
lines changed
4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,8 @@ aci <- function(est,
135
135
stop(' Subgroup order variable needs to be declared' )
136
136
}
137
137
sorted_order <- sort(subgroup_order )
138
- if (any(diff(sorted_order ) != 1 ) || any(sorted_order %% 1 != 0 )) {
138
+ if (! is.null(pop ) &
139
+ (any(diff(sorted_order ) != 1 ) || any(sorted_order %% 1 != 0 ))) {
139
140
stop(' Subgroup order variable must contain integers in increasing order' )
140
141
}
141
142
if (! is.null(weight ) & ! is.numeric(weight )) {
Original file line number Diff line number Diff line change @@ -145,7 +145,8 @@ rci <- function(est,
145
145
stop(' Subgroup order variable needs to be declared' )
146
146
}
147
147
sorted_order <- sort(subgroup_order )
148
- if (any(diff(sorted_order ) != 1 ) || any(sorted_order %% 1 != 0 )) {
148
+ if (! is.null(pop ) &
149
+ (any(diff(sorted_order ) != 1 ) || any(sorted_order %% 1 != 0 ))) {
149
150
stop(' Subgroup order variable must contain integers in increasing order' )
150
151
}
151
152
if (! is.null(weight ) & ! is.numeric(weight )) {
Original file line number Diff line number Diff line change @@ -154,7 +154,8 @@ rii <- function(est,
154
154
stop(' Subgroup order variable needs to be declared' )
155
155
}
156
156
sorted_order <- sort(subgroup_order )
157
- if (any(diff(sorted_order ) != 1 ) || any(sorted_order %% 1 != 0 )) {
157
+ if (! is.null(pop ) &
158
+ (any(diff(sorted_order ) != 1 ) || any(sorted_order %% 1 != 0 ))) {
158
159
stop(' Subgroup order variable must contain integers in increasing order' )
159
160
}
160
161
if (! is.null(weight ) & ! is.numeric(weight )) {
Original file line number Diff line number Diff line change @@ -151,7 +151,8 @@ sii <- function(est,
151
151
stop(' Subgroup order variable needs to be declared' )
152
152
}
153
153
sorted_order <- sort(subgroup_order )
154
- if (any(diff(sorted_order ) != 1 ) || any(sorted_order %% 1 != 0 )) {
154
+ if (! is.null(pop ) &
155
+ (any(diff(sorted_order ) != 1 ) || any(sorted_order %% 1 != 0 ))) {
155
156
stop(' Subgroup order variable must contain integers in increasing order' )
156
157
}
157
158
if (! is.null(weight ) & ! is.numeric(weight )) {
You can’t perform that action at this time.
0 commit comments