diff --git a/R/freq.R b/R/freq.R index 36730c16..5fc966c9 100755 --- a/R/freq.R +++ b/R/freq.R @@ -251,6 +251,12 @@ frequency_tbl <- function(x, new_list <- list(0) for (i in 1:length(user_exprs)) { new_list[[i]] <- eval_tidy(user_exprs[[i]], data = x) + if (length(new_list[[i]]) == 1) { + if (is.character(new_list[[i]]) & new_list[[i]] %in% colnames(x)) { + # support septic_patients %>% freq("hospital_id") + new_list[[i]] <- x %>% pull(new_list[[i]]) + } + } cols <- c(cols, as_label(user_exprs[[i]])) } diff --git a/docs/index.html b/docs/index.html index 8e236023..93b69ec0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -232,13 +232,21 @@

Get this package

-

This package is available on the official R network (CRAN), which has a peer-reviewed submission process. Install this package in R with:

+
+

+Latest released version

+

This package is available on the official R network (CRAN), which has a peer-reviewed submission process. Install this package in R with:

It will be downloaded and installed automatically. For RStudio, click on the menu Tools > Install Packages… and then type in “AMR” and press Install.

+
+
+

+Latest development version

The latest and unpublished development version can be installed with (precaution: may be unstable):

install.packages("devtools")
 devtools::install_gitlab("msberends/AMR")
+

Get started

diff --git a/index.md b/index.md index ea0434a3..13612a00 100644 --- a/index.md +++ b/index.md @@ -50,7 +50,9 @@ Developers ## Get this package -This package is available on the official R network (CRAN), which has a peer-reviewed submission process. Install this package in R with: +#### Latest released version + +This package is available [on the official R network (CRAN)](https://cran.r-project.org/package=AMR), which has a peer-reviewed submission process. Install this package in R with: ```r install.packages("AMR") @@ -58,6 +60,7 @@ install.packages("AMR") It will be downloaded and installed automatically. For RStudio, click on the menu *Tools* > *Install Packages...* and then type in "AMR" and press Install. +#### Latest development version The latest and unpublished development version can be installed with (precaution: may be unstable): ```r