* using log directory ‘/data/blackswan/ripley/R/packages/tests-devel/RMark.Rcheck’ * using R Under development (unstable) (2026-01-13 r89301) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3) GNU Fortran (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3) * running under: Fedora Linux 40 (Workstation Edition) * using session charset: UTF-8 * checking for file ‘RMark/DESCRIPTION’ ... OK * this is package ‘RMark’ version ‘3.0.6’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘RMark’ can be installed ... [15s/15s] OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking whether startup messages can be suppressed ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [31s/31s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... OK * checking data for ASCII and uncompressed saves ... OK * checking examples ... OK * checking examples with --run-donttest ... ERROR Running examples in ‘RMark-Ex.R’ failed The error most likely occurred in: > ### Name: HidMarkov > ### Title: Hidden Markov Model > ### Aliases: HidMarkov > > ### ** Examples > > ## No test: > # posted by Chris on phidot 15 Sept 2021 > # ---------------------------------------------------------------------------------- > # Fit HMM model with 2 unobservable states > # 5 states: > # 1 = successful breeder > # 2 = failed breeder > # 3 = post-successful breeder (unobservable) > # 4 = post-failed breeder (unobservable) > # 5 = dead > > # 4 field observations: > # 0 = not seen > # 1 = seen as successful breeder > # 2 = seen as failed breeder > # 5 = seen with uncertain breeding state (** this is an event in MARK terms) > > #----------------------------------------------------------------------------------- > > # Add a few uncertainty events (event = '5') to the above input data > df = c('1010001', + '1050000', '1010000', '1010000', '1010100', '1000000', '1000001', '1000001', + '1000001', '1010105', '1050101', '1010101', '1050101', '1010101', '1010101', + '1010101', '1010101', '1010001', '1000001', '1000001', '1000001', '1010101', + '1010101', '1010101', '1050101', '1010101', '1010101', '1010201', '1010201', + '1010201', '1010201', '1010201', '1010201', '1010201', '1010201', '1010201', + '1010201', '1010201', '1010201', '1010201', '1010201', '1050201', '1010205', + '2010201', '2010000', '2000000', '2000000', '2000000', '2000000', '2000000', + '2050220', '2010221', '2010221', '2050221', '2010221', '2010221', '2010221', + '2010221', '2010521', '2010251', '2012221', '2012222', '2012222', '2012222', + '2012251', '5012221', '2012020', '2022010', '2025010', '2022010', '2022010', + '2052010', '2022010', '2022010', '2022010', '2022010', '2021010', '2021010', + '2021010', '2051010', '2051010', '5021010', '2001000', '2025010', '2021010', + '2021010') > > df=as.data.frame(df); names(df) = "ch"; df$freq = 1; df$ch = as.character(df$ch) > head(df) ch freq 1 1010001 1 2 1050000 1 3 1010000 1 4 1010000 1 5 1010100 1 6 1000000 1 > > # 'event' is only for the uncertain observation - not the 'state' observations! > # Error in process.data: unused argument (events) if package marked is loaded in session > # states 3 & 4 = unobservable > > # Bill Kendall: For pi, MARK defaults to deriving the probability of the last state listed by > # subtraction. Since we like to fix pi for states 3 and 4 to 0, the solution is to list > # states 1 or 2 last when you specify the states. > > dp = process.data(df, model = "HidMarkov", strata.labels = c("3", "4","1", "2"), + events = c("5")) Note: More than one non-observable state has been specified > > ## create design data > ddl = make.design.data(dp) > > # Set movement parameters (PSI) to 0 > ddl$Psi$fix[ddl$Psi$stratum=="1" & ddl$Psi$tostratum=="4"]=0 > ddl$Psi$fix[ddl$Psi$stratum=="2" & ddl$Psi$tostratum=="3"]=0 > > ddl$Psi$fix[ddl$Psi$stratum=="3" & ddl$Psi$tostratum=="4"]=0 > ddl$Psi$fix[ddl$Psi$stratum=="4" & ddl$Psi$tostratum=="3"]=0 > > # Set unobservable p to 0 > ddl$p$fix[ddl$p$stratum=="3"]=0 > ddl$p$fix[ddl$p$stratum=="4"]=0 > > # animals can only enter as breeders, not as post-breeders (unobservable) > # In HMMs, the pi parameter is the probability of the event on the first capture. > # Note: P(event)! and not as in ESurge, where it is P(state on first capture)! > > # Set unobservable pi to 0 > ddl$pi$fix[ddl$pi$stratum=="3"]=0 > ddl$pi$fix[ddl$pi$stratum=="4"]=0 > > # The Delta parameters are the probability of determining the state given detection > # with probability p (MARK defaults to obtaining the probability of correctly assigning > # the state by subtraction) > ddl$Delta$fix[ddl$Delta$stratum=="3"]=0 > ddl$Delta$fix[ddl$Delta$stratum=="4"]=0 > > > # define a model to fit > # make a survival class (successful = post-successful != failed = post-failed) > ddl$S$class = ifelse(ddl$S$`3`=="1" |ddl$S$`1`=="1" , 1, 0) > > Phi.ct = list(formula=~class) > p.ct = list(formula=~stratum) > Psi.class =list(formula =~ -1+stratum:tostratum) > # see page 918 C.17. Multi-strata example in Mark book > pi.ct = list(formula=~stratum) > Delta.class = list(formula=~stratum) > > table(ddl$Psi[,c("stratum","tostratum")]) tostratum stratum 1 2 3 4 1 0 21 21 21 2 21 0 21 21 3 21 21 0 21 4 21 21 21 0 > table(ddl$pi[,c("stratum")]) 1 3 4 7 7 7 > table(ddl$Delta[,c("event")]) 5 84 > > > # Aim: run a HMM where uncertain events(=5) could be successful breeders or unsuccessful breeders > > Model.4 = mark(dp, ddl, model.parameters=list(S = Phi.ct, + p = p.ct, + Psi = Psi.class, + pi = pi.ct, + Delta = Delta.class), + output = FALSE,delete=TRUE, model ="HidMarkov", mlogit0 = TRUE) STOP ERROR INPUT --- proc title ; CPU Time in seconds for last procedure was 0.00 INPUT --- proc chmatrix occasions=7 groups=1 etype=HidMarkov events=1 INPUT --- strata=4 ICMeans NoHist hist= 32 ; INPUT --- time interval 1 1 1 1 1 1 ; ERROR -- Not enough time interval values specified. MARK did not run properly. If error message was not shown, look at most recent .out file > > summary(Model.4) Model output is not available in R. Check contents of mark001.out Error in wtable[i, cols] <- real[pim[i, cols]] : number of items to replace is not a multiple of replacement length Calls: summary -> summary.mark -> get.real -> Put.in.PIM.format Execution halted * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * checking for new files in some other directories ... OK * DONE Status: 1 ERROR See ‘/data/blackswan/ripley/R/packages/tests-devel/RMark.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 2:20.18, 112.84 + 27.20