R Under development (unstable) (2025-09-04 r88794 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(capushe) > data(datacapushe) > data(datavalidcapushe) > data(datapartialcapushe) > > datacapushe2=capushe(datacapushe,10) > print(datacapushe2) $DDSE_model [1] "K=21" $Djump_model [1] "K=21" $AIC_model [1] "K=3" $BIC_model [1] "K=3" > plot(datacapushe2,newwindow=FALSE,ask=FALSE) > summary(datacapushe2) Length Class Mode 1 Capushe S4 > > capushe(datacapushe,100) $DDSE_model [1] "K=21" $Djump_model [1] "K=21" $AIC_model [1] "K=3" $BIC_model [1] "K=3" > # capushe(datacapushe,pct=10) > # capushe(datacapushe,pct=-0.5) > # capushe(datacapushe,pct="a") > # capushe(datacapushe,pct=0.9) > > > capushe(datacapushe,point=10) $DDSE_model [1] "K=21" $Djump_model [1] "K=21" > # capushe(datacapushe,point=45) > # capushe(datacapushe,point=51) > # capushe(datacapushe,point=1.5) > # capushe(datacapushe,point="a") > # capushe(datacapushe,point=-3) > > library(MASS) > capushe(datacapushe,psi.rlm=psi.bisquare) $DDSE_model [1] "K=21" $Djump_model [1] "K=21" > capushe(datacapushe,psi.rlm="lm") $DDSE_model [1] "K=21" $Djump_model [1] "K=21" Warning message: In DDSE(data, pct = pct, point = point, psi.rlm = psi.rlm, scoef = scoef) : The function lm is used instead of rlm > capushe(datacapushe,psi.rlm=1) $DDSE_model [1] "K=21" $Djump_model [1] "K=21" Warning message: In DDSE(data, pct = pct, point = point, psi.rlm = psi.rlm, scoef = scoef) : The function lm is used instead of rlm > capushe(datacapushe,psi.rlm=psi.huber) $DDSE_model [1] "K=21" $Djump_model [1] "K=21" > capushe(datacapushe,psi.rlm=psi.hampel) $DDSE_model [1] "K=21" $Djump_model [1] "K=21" > > capushe(datacapushe,scoef=3) $DDSE_model [1] "K=21" $Djump_model [1] "K=21" > # capushe(datacapushe,scoef="a") > # capushe(datacapushe,scoef=-1) > # capushe(datacapushe,scoef=Inf) > > # capushe(datacapushe,n=-5) > # capushe(datacapushe,n=pi) > # capushe(datacapushe,n=Inf) > # capushe(datacapushe,n="a") > > capushe(datacapushe,Careajump=0.3) $DDSE_model [1] "K=21" $Djump_model [1] "K=21" > # capushe(datacapushe,Careajump="a") > # capushe(datacapushe,Careajump=-1) > # capushe(datacapushe,Careajump=1) > # capushe(datacapushe,Careajump=Inf) > > capushe(datacapushe,Ctresh=200) $DDSE_model [1] "K=21" $Djump_model [1] "K=21" > # capushe(datacapushe,Ctresh="a") > # capushe(datacapushe,Ctresh=250) > # capushe(datacapushe,Ctresh=1) > # capushe(datacapushe,Ctresh=Inf) > > plot(datacapushe2,newwindow=FALSE,ask=FALSE) > # plot(datacapushe2,newwindow=3) > > # plot(datacapushe2,ask=FALSE) > # plot(datacapushe2,ask=3) > # plot(datacapushe2,ask="a") > > # capushe(datacapushe[1:5,]) > > > dataNan=datacapushe > dataNan[2,3]=NaN > capushe(dataNan) $DDSE_model [1] "K=21" $Djump_model [1] "K=21" Warning message: In capushe(dataNan) : 1 line has been removed by capushe > dataNan[15,1]=NaN > capushe(dataNan) $DDSE_model [1] "K=21" $Djump_model [1] "K=21" Warning message: In capushe(dataNan) : 1 line has been removed by capushe > dataNan[15,3]=NaN > capushe(dataNan) $DDSE_model [1] "K=21" $Djump_model [1] "K=21" Warning message: In capushe(dataNan) : 2 lines have been removed by capushe > dataNan[8:50,4]=rep(NaN,43) > # capushe(dataNan) > > datacomplex=datacapushe > datacomplex[4,3]=-3 > # capushe(datacomplex) > datacomplex[4,3]=0.001 > # capushe(datacomplex) > > datapen=datacapushe > datapen[6,]=datapen[5,] > datapen[6,4]=1 > plot(capushe(datapen)@DDSE,newwindow=FALSE) Warning messages: 1: In capushe(datapen) : Models selected by DDSE and Djump are different 2: In title(...) : font metrics unknown for character 0x0a in encoding cp1252 3: In title(...) : font metrics unknown for character 0x0a in encoding cp1252 4: In title(...) : font metrics unknown for character 0x0a in encoding cp1252 5: In title(...) : font metrics unknown for character 0x0a in encoding cp1252 > datapen[6,4]=0.005 > plot(capushe(datapen)@DDSE,newwindow=FALSE) Warning messages: 1: In capushe(datapen) : Models selected by DDSE and Djump are different 2: In title(...) : font metrics unknown for character 0x0a in encoding cp1252 3: In title(...) : font metrics unknown for character 0x0a in encoding cp1252 4: In title(...) : font metrics unknown for character 0x0a in encoding cp1252 5: In title(...) : font metrics unknown for character 0x0a in encoding cp1252 > > capushepartial=capushe(datapartialcapushe) > validation(capushepartial,datavalidcapushe,newwindow=FALSE) > > dataNan=datavalidcapushe > dataNan[2,3]=NaN > validation(capushepartial,dataNan,newwindow=FALSE) Warning message: In .local(x, data2, ...) : 1 line in data2 has been removed by validation > dataNan[,3]=rep(NaN,3) > validation(capushepartial,dataNan,newwindow=FALSE) Warning message: In .local(x, data2, ...) : 3 lines in data2 have been removed by validation > > datacontrast=datacapushe > datacontrast[6,4]=-3 > capushe(datacontrast) $DDSE_model [1] "K=6" $Djump_model [1] "K=1" Warning message: In capushe(datacontrast) : Models selected by DDSE and Djump are different > > > > > > proc.time() user system elapsed 3.09 0.20 3.21