Skip to content

Commit da21639

Browse files
committed
removed nonsensical stuff
1 parent 8b9ebfb commit da21639

File tree

4 files changed

+20
-57
lines changed

4 files changed

+20
-57
lines changed

R/compute_sequentially.R

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
#'
88
#' @param data A data frame containing ranking or preference data with temporal
99
#' structure. The data frame must include `timepoint` and `user` columns.
10-
#'
10+
#'
1111
#' For complete or partial rankings, additional columns should be:
1212
#' \itemize{
1313
#' \item `timepoint`: Numeric vector denoting the timepoint, starting at 1.
1414
#' \item `user`: Vector identifying the user providing the ranking.
1515
#' \item `item1`, `item2`, etc.: Rankings of items (use NA for missing items
1616
#' in partial rankings).
1717
#' }
18-
#'
18+
#'
1919
#' For pairwise preferences, the structure should be:
2020
#' \itemize{
2121
#' \item `timepoint`: Numeric vector denoting the timepoint, starting at 1.
@@ -24,13 +24,13 @@
2424
#' \item `bottom_item`: Identifier for the less preferred item.
2525
#' }
2626
#'
27-
#' @param hyperparameters A list of hyperparameters returned from
27+
#' @param hyperparameters A list of hyperparameters returned from
2828
#' \code{\link{set_hyperparameters}}. Defines the prior distributions for
2929
#' model parameters.
30-
#' @param smc_options A list of SMC algorithm options returned from
30+
#' @param smc_options A list of SMC algorithm options returned from
3131
#' \code{\link{set_smc_options}}. Controls the behavior of the particle
3232
#' filtering algorithm.
33-
#' @param topological_sorts A list returned from
33+
#' @param topological_sorts A list returned from
3434
#' \code{\link{precompute_topological_sorts}}. Required when using pairwise
3535
#' preference data, otherwise should be \code{NULL} (default).
3636
#'
@@ -42,7 +42,7 @@
4242
#' # Example with complete rankings
4343
#' set.seed(123)
4444
#' n_items <- 4
45-
#'
45+
#'
4646
#' # Create synthetic ranking data
4747
#' ranking_data <- data.frame(
4848
#' timepoint = c(1, 1, 2, 2),
@@ -52,23 +52,21 @@
5252
#' item3 = c(3, 4, 2, 4),
5353
#' item4 = c(4, 3, 4, 2)
5454
#' )
55-
#'
55+
#'
5656
#' # Set up hyperparameters and options
5757
#' hyper <- set_hyperparameters(n_items = n_items)
5858
#' opts <- set_smc_options(n_particles = 100, verbose = FALSE)
59-
#'
60-
#' \dontrun{
61-
#' # Run sequential inference (requires compiled C++ code)
59+
#'
60+
#' # Run sequential inference
6261
#' result <- compute_sequentially(
6362
#' data = ranking_data,
6463
#' hyperparameters = hyper,
6564
#' smc_options = opts
6665
#' )
67-
#' }
68-
#'
66+
#'
6967
#' @references
7068
#' \insertRef{sorensen2025sequential}{BayesMallowsSMC2}
71-
#'
69+
#'
7270
#' @export
7371
#'
7472
compute_sequentially <- function(
@@ -115,7 +113,7 @@ compute_sequentially <- function(
115113
user_timepoint_combinations <- unique(data[c("user", "timepoint")])
116114
if(max(table(user_timepoint_combinations$user)) > 1) {
117115
stop("Each user can only enter the pool once. Users appearing at multiple timepoints: ",
118-
paste(names(table(user_timepoint_combinations$user))[table(user_timepoint_combinations$user) > 1],
116+
paste(names(table(user_timepoint_combinations$user))[table(user_timepoint_combinations$user) > 1],
119117
collapse = ", "))
120118
}
121119

man/compute_sequentially.Rd

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/precompute_topological_sorts.Rd

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/run_smc.Rd

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)