Skip to content

Commit

Permalink
Merge pull request #70 from africanmathsinitiative/master
Browse files Browse the repository at this point in the history
Updating master
  • Loading branch information
Ogik99 authored Jan 9, 2020
2 parents 2fbb560 + 51f5bf0 commit 2a9a8e8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
6 changes: 3 additions & 3 deletions docs/Download.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@
<div class="col-lg-8 col-lg-offset-2 text-center">
<h2 class="section-heading">Download R-Instat</h2>
<hr class="light">
<p>If this is your first time downloading R-Instat, we recommend you <a href="http://bit.ly/2Jl5Byo" style="color:blue;" target="_blank">download the Complete Installer</a>. The Complete Installer is the same version of R-Instat as the Basic Installer but also includes the required version of R (3.6.0 currently) to run R-Instat.</p>
<p>If this is your first time downloading R-Instat, we recommend you <a href="http://bit.ly/33O7Z87" style="color:blue;" target="_blank">download the Complete Installer</a>. The Complete Installer is the same version of R-Instat as the Basic Installer but also includes the required version of R (3.6.0 currently) to run R-Instat.</p>
<p>If you do not know if you have the latest version of R, download the Complete Installer. The Basic Installer does not include R.</p>
<p>R-Instat is currently a Windows only application. However, it can be accessed on Mac or Linux through use of a Virtual Windows Machine.</p>
<p><a href="http://bit.ly/2Jl5Byo" style="color:blue;" target="_blank">R-Instat 0.5.4 Complete Installer (.exe 577MB)</a></p>
<p><a href="http://bit.ly/2ph63H1" style="color:blue;" target="_blank">R-Instat 0.5.4 Basic Installer (.msi 499MB)</a></p>
<p><a href="http://bit.ly/33O7Z87" style="color:blue;" target="_blank">R-Instat 0.5.5 Complete Installer (.exe 594MB)</a></p>
<p><a href="http://bit.ly/2sI7CiE" style="color:blue;" target="_blank">R-Instat 0.5.5 Basic Installer (.msi 516MB)</a></p>

<h2 class="section-heading">Installation & Documentation</h2>
<hr class="light">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,18 +287,23 @@ DataBook$set("public", "summary", function(data_name, columns_to_summarise, summ
})
names(calc_apply)[length(factors_disp) + 1] <- col_new
calc_apply$summary <- summary_names[j]
names(calc_apply) <- make.names(names(calc_apply), unique = TRUE)
if(j <= count_summaries_max) results_temp_count[[length(results_temp_count) + 1]] <- calc_apply
else results_temp_other[[length(results_temp_other) + 1]] <- calc_apply
}
results_temp_count <- dplyr::bind_rows(results_temp_count)
results_temp_other <- dplyr::bind_rows(results_temp_other)
results_temp_count <- format(results_temp_count, scientific = FALSE)
results_temp_other <- format(results_temp_other, scientific = FALSE)
# Convert summaries which have been coerced to numeric but should be dates
if("Date" %in% col_data_type[i]) {
results_temp_other[[col_new]] <- dplyr::if_else(summaries_other[match(results_temp_other$summary, summary_other_names)] %in% date_summaries,
as.character(as.Date(as.numeric(results_temp_other[[col_new]]), origin = "1970/1/1")),
paste(results_temp_other[[col_new]], "days"))
if(length(results_temp_count) > 0) {
results_temp_count <- dplyr::bind_rows(results_temp_count)
results_temp_count <- format(results_temp_count, scientific = FALSE)
}
if(length(results_temp_other) > 0) {
results_temp_other <- dplyr::bind_rows(results_temp_other)
results_temp_other <- format(results_temp_other, scientific = FALSE)
# Convert summaries which have been coerced to numeric but should be dates
if("Date" %in% col_data_type[i]) {
results_temp_other[[col_new]] <- dplyr::if_else(summaries_other[match(results_temp_other$summary, summary_other_names)] %in% date_summaries,
as.character(as.Date(as.numeric(results_temp_other[[col_new]]), origin = "1970/1/1")),
dplyr::if_else(stringr::str_trim(results_temp_other[[col_new]]) == "NA", NA_character_, paste(results_temp_other[[col_new]], "days")))
}
}
results_temp <- dplyr::bind_rows(results_temp_count, results_temp_other)
if(i == 1) results <- results_temp
Expand Down Expand Up @@ -637,6 +642,8 @@ summary_count_non_missing <- function(x, ...) {
}

summary_sd <- function(x, na.rm = FALSE, na_type = "", ...) {
# needed because e.g. sd(as.character(1:10)) returns a numeric value
if(is.character(x)) return(NA)
if(na.rm && na_type != "" && !na_check(x, na_type = na_type, ...)) return(NA)
else{
return(sd(x,na.rm = na.rm))
Expand Down

0 comments on commit 2a9a8e8

Please sign in to comment.