Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions facebook/delphiFacebook/R/variables.R
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,10 @@ code_vaccines <- function(input_data, wave) {
# If the entire column is NA, ifelse() results in a logical vector, not a
# character vector, which confuses split_options; since the result should be
# NA anyway
vaccine_barriers <- as.character(
ifelse(vaccine_barriers == "13", NA_character_, vaccine_barriers)
)
if (any(!is.na(vaccine_barriers))) {
vaccine_barriers <- ifelse(vaccine_barriers == "13", NA_character_, vaccine_barriers)
vaccine_barriers <- split_options(vaccine_barriers)
}

Expand Down Expand Up @@ -786,11 +788,11 @@ code_vaccines <- function(input_data, wave) {
# If the entire column is NA, ifelse() results in a logical vector, not a
# character vector, which confuses split_options; since the result should be
# NA anyway
if (any(!is.na(input_data$V15b))) {
vaccine_barriers <- ifelse(input_data$V15b == "13", NA, input_data$V15b)
vaccine_barriers <- as.character(
ifelse(input_data$V15b == "13", NA, input_data$V15b)
)
if (any(!is.na(vaccine_barriers))) {
vaccine_barriers <- split_options(vaccine_barriers)
} else {
vaccine_barriers <- input_data$V15b
}

input_data$v_vaccine_barrier_eligible_tried <- is_selected(vaccine_barriers, "1")
Expand Down
5 changes: 0 additions & 5 deletions facebook/delphiFacebook/src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// is_selected_cpp
LogicalVector is_selected_cpp(List responses, String target);
RcppExport SEXP _delphiFacebook_is_selected_cpp(SEXP responsesSEXP, SEXP targetSEXP) {
Expand Down