From 548e9c5f1738c406fbc79c4da0307b3d16ea6bb5 Mon Sep 17 00:00:00 2001 From: Jouni Helske Date: Sun, 15 Sep 2024 22:35:50 +0300 Subject: [PATCH] as.array --- R/fit_mnhmm.R | 4 ++-- R/fit_mnhmm2.R | 4 ++-- R/fit_nhmm.R | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/R/fit_mnhmm.R b/R/fit_mnhmm.R index 6aba1590..8db8a28e 100644 --- a/R/fit_mnhmm.R +++ b/R/fit_mnhmm.R @@ -76,7 +76,7 @@ fit_mnhmm <- function(model, inits, init_sd, restarts, threads, verbose, penaliz X_o = model$X_emission, X_d = model$X_cluster, obs = obs, - ids = seq_len(model$n_sequences), + ids = as.array(seq_len(model$n_sequences)), N_sample = model$n_sequences ), as_vector = FALSE, @@ -128,7 +128,7 @@ fit_mnhmm <- function(model, inits, init_sd, restarts, threads, verbose, penaliz X_o = model$X_emission, X_d = model$X_cluster, obs = obs, - ids = seq_len(model$n_sequences), + ids = as.array(seq_len(model$n_sequences)), N_sample = model$n_sequences ), as_vector = FALSE, diff --git a/R/fit_mnhmm2.R b/R/fit_mnhmm2.R index a6ed63db..afa99bad 100644 --- a/R/fit_mnhmm2.R +++ b/R/fit_mnhmm2.R @@ -81,7 +81,7 @@ fit_mnhmm2 <- function(model, inits, init_sd, restarts, threads, verbose, X_o = model$X_emission, X_d = model$X_cluster, obs = obs, - ids = ids, + ids = as.array(ids), N_sample = n ), as_vector = FALSE, @@ -121,7 +121,7 @@ fit_mnhmm2 <- function(model, inits, init_sd, restarts, threads, verbose, X_o = model$X_emission, X_d = model$X_cluster, obs = obs, - ids = seq_len(model$n_sequences), + ids = as.array(seq_len(model$n_sequences)), N_sample = model$n_sequences ), as_vector = FALSE, diff --git a/R/fit_nhmm.R b/R/fit_nhmm.R index 384e1456..7aab108e 100644 --- a/R/fit_nhmm.R +++ b/R/fit_nhmm.R @@ -69,7 +69,7 @@ fit_nhmm <- function(model, inits, init_sd, restarts, threads, verbose, penalize X_s = model$X_transition, X_o = model$X_emission, obs = obs, - ids = seq_len(model$n_sequences), + ids = as.array(seq_len(model$n_sequences)), N_sample = model$n_sequences ), as_vector = FALSE, @@ -118,7 +118,7 @@ fit_nhmm <- function(model, inits, init_sd, restarts, threads, verbose, penalize X_s = model$X_transition, X_o = model$X_emission, obs = obs, - ids = seq_len(model$n_sequences), + ids = as.array(seq_len(model$n_sequences)), N_sample = model$n_sequences ), as_vector = FALSE,