* using log directory 'd:/RCompile/CRANincoming/R-devel/CureAuxSP.Rcheck' * using R Under development (unstable) (2024-02-25 r85988 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 12.3.0 GNU Fortran (GCC) 12.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'CureAuxSP/DESCRIPTION' ... OK * this is package 'CureAuxSP' version '0.0.1' * package encoding: UTF-8 * checking CRAN incoming feasibility ... NOTE Maintainer: 'Jie Ding ' New submission * 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 hidden files and directories ... OK * checking for portable file names ... OK * checking serialization versions ... OK * checking whether package 'CureAuxSP' can be installed ... WARNING Found the following significant warnings: Warning: D:/temp/RtmpoTwaHs/R.INSTALL2aa9c15561925/CureAuxSP/man/SMC.AFT.Stx.Rd:31: unknown macro '\SMC' Warning: D:/temp/RtmpoTwaHs/R.INSTALL2aa9c15561925/CureAuxSP/man/SMC.AFT.Sutx.Rd:25: unknown macro '\SMC' See 'd:/RCompile/CRANincoming/R-devel/CureAuxSP.Rcheck/00install.out' for details. * checking installed package size ... OK * checking package directory ... OK * checking for future file timestamps ... OK * checking DESCRIPTION meta-information ... NOTE Author field differs from that derived from Authors@R Author: 'Jie Ding [aut, cre], Jialiang Li [aut], Mengxiu Zhang [aut], Xiaoguang Wang [aut]' Authors@R: 'Jie Ding [aut, cre] (), Jialiang Li [aut] (), Mengxiu Zhang [aut] (), Xiaoguang Wang [aut] ()' * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R 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 ... [10s] OK * checking whether the package can be unloaded cleanly ... [11s] 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 ... [11s] OK * checking use of S3 registration ... OK * checking dependencies in R code ... NOTE Package in Depends field not imported from: 'TCGAbiolinks' These packages need to be imported from (in the NAMESPACE file) for when this namespace is loaded but not attached. * checking S3 generic/method consistency ... NOTE Mismatches for apparent methods not registered: print: function(x, ...) print.SMC.AuxSP: function(object) See section 'Registering S3 methods' in the 'Writing R Extensions' manual. * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... NOTE SMC.AFT.fit: no visible global function definition for 'optim' SMC.AuxSP: no visible global function definition for 'model.response' SMC.AuxSP: no visible global function definition for 'model.frame' SMC.AuxSP: no visible global function definition for 'model.matrix' SMC.AuxSP.fit: no visible global function definition for 'is' SMC.AuxSP.fit: no visible binding for global variable 'sd' SMC.AuxSP.fit: no visible global function definition for 'cov' SMC.AuxSP.fit: no visible global function definition for 'pchisq' SMC.AuxSP.fit: no visible global function definition for 'pnorm' sdata.SMC: no visible global function definition for 'runif' sdata.SMC: no visible global function definition for 'rbinom' sdata.SMC: no visible global function definition for 'uniroot' sdata.SMC: no visible binding for global variable 'nu' sdata.SMC: no visible global function definition for 'rexp' Undefined global functions or variables: cov is model.frame model.matrix model.response nu optim pchisq pnorm rbinom rexp runif sd uniroot Consider adding importFrom("methods", "is") importFrom("stats", "cov", "model.frame", "model.matrix", "model.response", "optim", "pchisq", "pnorm", "rbinom", "rexp", "runif", "sd", "uniroot") to your NAMESPACE file (and ensure that your DESCRIPTION Imports field contains 'methods'). * checking Rd files ... WARNING prepare_Rd: ./man/SMC.AFT.Stx.Rd:31: unknown macro '\SMC' prepare_Rd: ./man/SMC.AFT.Sutx.Rd:25: unknown macro '\SMC' * checking Rd metadata ... OK * checking Rd line widths ... NOTE Rd file 'SMC.AuxSP.Rd': \examples lines wider than 100 characters: yobs = ifelse(!is.na(clinical[,'days_to_death']),clinical[,'days_to_death'],clinical[,'days_to_last_followup'])/365, Race = ifelse(clinical[,'race_list']=='BLACK OR AFRICAN AMERICAN','black',ifelse(clinical[,'race_list']=='WHITE','white','other')), Gender = ifelse(clinical[,'gender']=='FEMALE','Female',ifelse(clinical[,'gender']=='MALE','Male',NA)), Stage = sapply(clinical[,'stage_event_pathologic_stage'],function(x,pattern='Stage X|Stage IV|Stage [I]*'){ These lines will be truncated in the PDF manual. * 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 examples ... [276s] ERROR Running examples in 'CureAuxSP-Ex.R' failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: SMC.AuxSP > ### Title: Semi-parametric mixture cure model with auxiliary subgroup > ### survival information > ### Aliases: SMC.AuxSP > > ### ** Examples > > > #--------------------------------------------------------------------# > # illustration via simulated dataset (from PH mixture cure model) #### > #--------------------------------------------------------------------# > > ## library > library(survival) > library(CureAuxSP) > > ## generate both the internal dataset of interest and the external dataset > > # - the internal dataset > set.seed(1) > sdata.internal <- sdata.SMC(n = 300) cure.rate censoring.rate 0.4866667 0.5933333 > head(sdata.internal) yobs delta X1 X2 1 9.274028 0 -0.4689827 1 2 3.862288 0 -0.2557522 0 3 3.733069 0 0.1457067 0 4 3.915764 0 0.8164156 0 5 6.253989 0 -0.5966361 0 6 3.778745 0 0.7967794 1 > > # - the external dataset > set.seed(1) > sdata.external <- sdata.SMC(n = 10000) cure.rate censoring.rate 0.5068 0.6113 > > ## prepare the auxiliary information based on the external dataset > > # - define two functions for subgroup splitting > gfunc.t1 <- function(X,Z=NULL){ + rbind((X[,1] < 0 & X[,2] == 0), (X[,1] >= 0 & X[,2] == 0), + (X[,1] < 0 & X[,2] == 1), (X[,1] >= 0 & X[,2] == 1))} > gfunc.t2 <- function(X,Z=NULL){rbind((X[,2] == 0), (X[,2] == 1))} > > # - calculate subgroup survival rates > sprob.t1 <- Probs.Sub(tstar = 1, sdata = sdata.external, + G = gfunc.t1(X = sdata.external[,-c(1,2)])) > sprob.t2 <- Probs.Sub(tstar = 2, sdata = sdata.external, + G = gfunc.t2(X = sdata.external[,-c(1,2)])) > cat("Information at t* = 1:", sprob.t1, "\nInformation at t* = 2:", sprob.t2) Information at t* = 1: 0.73 0.7 0.88 0.83 Information at t* = 2: 0.62 0.76> > # - prepare the set that collects information about auxiliary data > aux <- list( + time1 = list(tstar = 1, gfunc = gfunc.t1, sprob = c(0.73,0.70,0.88,0.83)), + time2 = list(tstar = 2, gfunc = gfunc.t2, sprob = c(0.62,0.76)-0.20) + ) > > ## fit the model without auxiliary information > set.seed(1) > sol.PHMC <- SMC.AuxSP( + formula = Surv(yobs,delta) ~ X1 + X2, cureform = ~ X1, + sdata = sdata.internal, aux = NULL, latency = "PH" + ) > print.SMC.AuxSP(object = sol.PHMC) PH Mixture Cure Model without Auxiliary Information: - Cure Probability Model Est SE zvalue pvalue Intercept 0.002550101 0.1424502 0.01790171 9.857173e-01 X1 -1.214829035 0.2864443 -4.24106601 2.224607e-05 - Failure Time Distribution Model Est SE zvalue pvalue X1 0.8765172 0.2072169 4.229950 2.337436e-05 X2 -0.9535575 0.2501417 -3.812069 1.378083e-04 > > ## fit the model with auxiliary information > > # - ignore heterogeneity > set.seed(1) > sol.PHMC.Homo <- SMC.AuxSP( + formula = Surv(yobs,delta) ~ X1 + X2, cureform = ~ X1, + sdata = sdata.internal, aux = aux, hetero = FALSE, latency = "PH" + ) > print.SMC.AuxSP(object = sol.PHMC.Homo) PH Mixture Cure Model with Homogeneous Auxiliary Information: - Cure Probability Model Est SE zvalue pvalue Intercept 0.5810034 0.1113003 5.220141 1.787866e-07 X1 -1.2245266 0.2018874 -6.065394 1.316305e-09 - Failure Time Distribution Model Est SE zvalue pvalue X1 0.8611347 0.13271172 6.488761 8.654499e-11 X2 -0.9483803 0.04840981 -19.590665 0.000000e+00 - Test For Evaluating Homogeneity value df pvalue 113.9564 6.0000 0.0000 > > # - consider heterogeneity > set.seed(1) > sol.PHMC.Hetero <- SMC.AuxSP( + formula = Surv(yobs,delta) ~ X1 + X2, cureform = ~ X1, + sdata = sdata.internal, aux = aux, hetero = TRUE, latency = "PH" + ) > print.SMC.AuxSP(object = sol.PHMC.Hetero) PH Mixture Cure Model with Heterogeneous Auxiliary Information: - Cure Probability Model Est SE zvalue pvalue Intercept 0.1289342 0.1339374 0.9626455 3.357254e-01 X1 -1.0516437 0.2507823 -4.1934525 2.747407e-05 - Failure Time Distribution Model Est SE zvalue pvalue X1 1.061823 0.17065021 6.222218 4.901766e-10 X2 -1.007384 0.09503961 -10.599627 0.000000e+00 - Identified Heterogeneous Auxiliary Information G21 G22 0.1677901 0.1778338 > > > #--------------------------------------------------------------------# > # illustration via real breast cancer dataset (from TCGA program) #### > #--------------------------------------------------------------------# > > ## library > library(survival) > library(CureAuxSP) > > ## prepare the breast cancer dataset > > # - download clinical data from the TCGA website > library(TCGAbiolinks) > query <- GDCquery(project = "TCGA-BRCA", + data.category = "Clinical", file.type = "xml") Error in GDCquery(project = "TCGA-BRCA", data.category = "Clinical", file.type = "xml") : unused argument (file.type = "xml") Execution halted * checking PDF version of manual ... [14s] OK * checking HTML version of manual ... OK * DONE Status: 1 ERROR, 2 WARNINGs, 6 NOTEs