Skip to content

Commit

Permalink
Updated R examples to avoid lines running over 100 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewherren committed Jan 16, 2025
1 parent f412ee8 commit 324dcf3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
6 changes: 3 additions & 3 deletions R/bart.R
Original file line number Diff line number Diff line change
Expand Up @@ -1015,9 +1015,9 @@ predict.bartmodel <- function(bart, X_test, W_test = NULL, group_ids_test = NULL
#' rfx_basis_train <- rfx_basis[train_inds,]
#' rfx_term_test <- rfx_term[test_inds]
#' rfx_term_train <- rfx_term[train_inds]
#' bart_model <- bart(X_train = X_train, y_train = y_train,
#' group_ids_train = group_ids_train, rfx_basis_train = rfx_basis_train,
#' X_test = X_test, group_ids_test = group_ids_test, rfx_basis_test = rfx_basis_test,
#' bart_model <- bart(X_train = X_train, y_train = y_train, X_test = X_test,
#' group_ids_train = group_ids_train, group_ids_test = group_ids_test,
#' rfx_basis_train = rfx_basis_train, rfx_basis_test = rfx_basis_test,
#' num_gfr = 100, num_burnin = 0, num_mcmc = 100)
#' rfx_samples <- getRandomEffectSamples(bart_model)
getRandomEffectSamples.bartmodel <- function(object, ...){
Expand Down
6 changes: 4 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,8 @@ oneHotEncode <- function(x_input, unique_levels) {
#' @export
#'
#' @examples
#' x <- c("1. Strongly disagree", "3. Neither agree nor disagree", "2. Disagree", "4. Agree", "3. Neither agree nor disagree", "5. Strongly agree", "4. Agree")
#' x <- c("1. Strongly disagree", "3. Neither agree nor disagree", "2. Disagree",
#' "4. Agree", "3. Neither agree nor disagree", "5. Strongly agree", "4. Agree")
#' preprocess_list <- orderedCatInitializeAndPreprocess(x)
#' x_preprocessed <- preprocess_list$x_preprocessed
orderedCatInitializeAndPreprocess <- function(x_input) {
Expand Down Expand Up @@ -679,7 +680,8 @@ orderedCatInitializeAndPreprocess <- function(x_input) {
#' @export
#'
#' @examples
#' x_levels <- c("1. Strongly disagree", "2. Disagree", "3. Neither agree nor disagree",
#' x_levels <- c("1. Strongly disagree", "2. Disagree",
#' "3. Neither agree nor disagree",
#' "4. Agree", "5. Strongly agree")
#' x <- c("1. Strongly disagree", "3. Neither agree nor disagree", "2. Disagree",
#' "4. Agree", "3. Neither agree nor disagree", "5. Strongly agree", "4. Agree")
Expand Down
6 changes: 3 additions & 3 deletions man/getRandomEffectSamples.bartmodel.Rd

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

3 changes: 2 additions & 1 deletion man/orderedCatInitializeAndPreprocess.Rd

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

3 changes: 2 additions & 1 deletion man/orderedCatPreprocess.Rd

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

0 comments on commit 324dcf3

Please sign in to comment.