New upstream version 4.7-2
Dirk Eddelbuettel
1 year, 5 months ago
0 | 0 | Package: Hmisc |
1 | Version: 4.7-1 | |
2 | Date: 2022-08-13 | |
1 | Version: 4.7-2 | |
2 | Date: 2022-11-18 | |
3 | 3 | Title: Harrell Miscellaneous |
4 | 4 | Authors@R: |
5 | 5 | c(person(given = "Frank E", |
17 | 17 | Imports: methods, latticeExtra, cluster, rpart, nnet, foreign, gtable, |
18 | 18 | grid, gridExtra, data.table, htmlTable (>= 1.11.0), viridis, |
19 | 19 | htmltools, base64enc |
20 | Suggests: acepack, chron, rms, mice, tables, knitr, plotly (>= 4.5.6), | |
21 | rlang, plyr, VGAM | |
20 | Suggests: acepack, chron, rms, mice, rstudioapi, tables, knitr, plotly | |
21 | (>= 4.5.6), rlang, plyr, VGAM | |
22 | 22 | Description: Contains many functions useful for data |
23 | 23 | analysis, high-level graphics, utility operations, functions for |
24 | 24 | computing sample size and power, simulation, importing and annotating datasets, |
31 | 31 | Encoding: UTF-8 |
32 | 32 | RoxygenNote: 7.1.2 |
33 | 33 | NeedsCompilation: yes |
34 | Packaged: 2022-08-13 16:19:03 UTC; harrelfe | |
34 | Packaged: 2022-11-18 21:34:48 UTC; harrelfe | |
35 | 35 | Author: Frank E Harrell Jr [aut, cre] (<https://orcid.org/0000-0002-8271-5493>), |
36 | 36 | Charles Dupont [ctb] (contributed several functions and maintains latex |
37 | 37 | functions) |
38 | 38 | Repository: CRAN |
39 | Date/Publication: 2022-08-15 08:30:07 UTC | |
39 | Date/Publication: 2022-11-18 23:10:06 UTC |
0 | 0 | 16f8ea43efba90112351c5ecb33021c4 *COPYING |
1 | 4f4db629bb7f3c02c2d3e3eb1383ae93 *DESCRIPTION | |
2 | 69ecc0f3b7619c0c9c485f9e4090876b *NAMESPACE | |
3 | 29f47d500e691390810394ac086e08d6 *NEWS | |
1 | 82b2ae379b6767250be8cb87fa3de2d1 *DESCRIPTION | |
2 | 5992b9f2844076f7afd6b4e6bfd6f3d5 *NAMESPACE | |
3 | 63e15b1afbf17d92df36ef95a76e7e19 *NEWS | |
4 | 4 | 76f90acbe9bf8ad2eaaa6b8813eb7c82 *R/AFirst.lib.s |
5 | 5 | 8fdbfa3b900cbbb42d94898093ec7fa5 *R/Cs.s |
6 | 6 | 85683865508739ff7a19b280e562ab67 *R/GiniMd.s |
7 | 7 | 7d0b0014572f85d46fa6a3417707344c *R/Key.s |
8 | b4731cac9abe82106e4b535a77f688d2 *R/Merge.r | |
9 | 9c7f09bcf89619e07189e8f7552e7c4f *R/Misc.s | |
8 | 10afe48276f47fe7b9cbeba8b151ee42 *R/Merge.r | |
9 | 0091bb7f60a12a811825db0b06fb01ef *R/Misc.s | |
10 | 10 | 081320dfb53e3362cfb0918952b60cce *R/R2Measures.r |
11 | 11 | 9043da0ab6b8288636bb399cdb0f89bf *R/abs.error.pred.s |
12 | 12 | bdf1cbb1952b1cdf53a296a6d29ecb08 *R/areg.s |
30 | 30 | 97dc5dcc48cb719088b817833067352c *R/dataRep.s |
31 | 31 | ec8af558be91e1fa3415f1a99dd469b2 *R/dates.s |
32 | 32 | 3f02d2486d14e095a96fe5ee10e483c7 *R/deff.s |
33 | c7e75ba0cf44a10c97633ab3a82e5beb *R/describe.s | |
33 | 7c467c898b81b927a07e19bfbc50ffc5 *R/describe.s | |
34 | 34 | 6cb5b3a77860b605f102bb528e84a071 *R/discrete.s |
35 | 35 | 510723f9ba799696bf0196fc231e2ca2 *R/dotchart3.s |
36 | 36 | 14ad428dacb6bed7013fdef6c05d9239 *R/dotchartpl.s |
63 | 63 | 8cf9e0a10997c59a5be3f19a39c73684 *R/james.stein.s |
64 | 64 | 8015b8ce84b2cc4686fca6ebba40e916 *R/labcurve.s |
65 | 65 | bb1e0963d40b2a6df05f9277484c5ebb *R/label.s |
66 | 838bc6afccec32608b1bc14fc05d27e6 *R/latex.s | |
66 | 526e1c9a614e4914908b00f675466117 *R/latex.s | |
67 | 67 | 4e31dcfc293ca68d459764b5d32515f3 *R/latexCheckOptions.r |
68 | 68 | dda324419c115accb95440b58d422d43 *R/latexDotchart.s |
69 | 69 | b160964c8423acea603c95a04c791084 *R/latexTabular.s |
70 | 70 | 67c8a6450a4ead25d7fe5a7944a40d12 *R/latexTherm.s |
71 | 71 | f15937a81b1e2a57a9707f5fbdd6c878 *R/list.tree.s |
72 | 72 | ce608a6c653ec8c6fe828448f9a78eb6 *R/mApply.s |
73 | 2d052be3962a7b8042d0cef39231d48d *R/mChoice.s | |
73 | d62470527f34181cace3f8935e4e35ea *R/mChoice.s | |
74 | 74 | e21c3cbb9b9c17b07223d4f805433395 *R/makeNstr.s |
75 | 75 | e5f0eef89d954522d56fb5399066a6d3 *R/mask.s |
76 | 76 | f4cc097babcda3c1edcd60f516713ff2 *R/matxv.s |
140 | 140 | eb87b4f621bfa787f568ceca584f9240 *R/tabulr.s |
141 | 141 | c1dba69a612fd6fb121adb946a77596e *R/tex.s |
142 | 142 | 2b30ea0d0be2d1eca4d07d2bcd1cc2aa *R/transace.s |
143 | 9eb090abfa2d4a84995078c72761f3eb *R/transcan.s | |
143 | d1bfd0b35c0217dfd3b3d9b96929142b *R/transcan.s | |
144 | 144 | 847daf7fa4e67d6641c763a7873df93c *R/translate.s |
145 | 145 | 91c82b7b8e9ad8cff084bf7b2069d11b *R/units.s |
146 | 146 | 9cc4a154ada63f71e4eb19c38453e445 *R/upData.s |
238 | 238 | 71a62f91bcd26f7cbfa9a2755bed0830 *man/Save.Rd |
239 | 239 | 79ed6280942247ec7b4580638c1cc885 *man/abs.error.pred.Rd |
240 | 240 | 6ed0de6a1ac299e867fea5c42fd49024 *man/addMarginal.Rd |
241 | 2db34295a22ca5a59d3557f50e4ac2e7 *man/all.is.numeric.Rd | |
241 | 77a208cf321e5241f5e11e4dbb6d101e *man/all.is.numeric.Rd | |
242 | 242 | 89bde30f0578686f86512ffe08e7e4be *man/approxExtrap.Rd |
243 | 243 | 03eed851f558773c200c8e2e09c9fff3 *man/areg.Rd |
244 | 244 | 162611103783a62d004aa9af0666690a *man/aregImpute.Rd |
282 | 282 | ebdd21800ffc4beea994eaac7d5b4668 *man/gbayes.Rd |
283 | 283 | 47920142f9583c30c3b4bbd60d9a3035 *man/gbayesSeqSim.Rd |
284 | 284 | bd9c601a3778a3bc502d85fa39dcb058 *man/getHdata.Rd |
285 | cf232c11fafdccc1efa3a6b67a3708c0 *man/getRs.Rd | |
285 | 2e3625a44c067d7004d304ca7940e9f6 *man/getRs.Rd | |
286 | 286 | c10b701ac0c5fbf3a3a3654378694a1c *man/getZip.Rd |
287 | 287 | ac60ee276185df5b27c0819a3e781bae *man/ggMisc.Rd |
288 | 288 | da13083c7f23c4a36a1b49ccfc1e87e3 *man/ggfreqScatter.Rd |
289 | 289 | 988163ff858c2a7b23ed89d50e056403 *man/ggplotlyr.Rd |
290 | 290 | bd30d6597a6591b2d3b6202931502245 *man/hdquantile.Rd |
291 | 9bde85cef5a8815e6a4adbc2163aa870 *man/hidingTOC.Rd | |
291 | 3ad9255f40b316ad3c4349c842daad6a *man/hidingTOC.Rd | |
292 | 292 | 8256dd2a02e789ad86ec974fa90420cd *man/hist.data.frame.Rd |
293 | 293 | 901875cc993a500f248fb22af00183d4 *man/histbackback.Rd |
294 | 294 | 450305dcabbc06b9fb94f85d4dd4dbb0 *man/histboxp.Rd |
299 | 299 | 396c791f149027eeafaa9515e93d3d27 *man/knitrSet.Rd |
300 | 300 | 8fcd85e7402db30d54a27e1222355606 *man/labcurve.Rd |
301 | 301 | af738949158db99a2448cb48d3b310d3 *man/label.Rd |
302 | b4e0d1d0f22212f7e2c5b31f570196a4 *man/latex.Rd | |
302 | bebcb911d2f805ec0079cf0d7e4c02c7 *man/latex.Rd | |
303 | 303 | 9c1dfa5242426105b1ca4669b0977997 *man/latexCheckOptions.Rd |
304 | 304 | c4a248262270a156d9723212daba90ff *man/latexDotchart.Rd |
305 | 305 | 32f49f9726f15c0cae64179b3df74f20 *man/latexTabular.Rd |
307 | 307 | e110de27ad37decbe96987691beb7555 *man/legendfunctions.Rd |
308 | 308 | 3e0817d289b96a7d59847a1144f5fa59 *man/list.tree.Rd |
309 | 309 | a327d909648492c3e5b524888e27c35a *man/mApply.Rd |
310 | 0d4948a3cd6757749816fbb2cdb6f96b *man/mChoice.Rd | |
310 | f66d70a00d4ac8c6e69a916c41a23871 *man/mChoice.Rd | |
311 | 311 | c2c3d7fd7b6118a5480308fcacb57afa *man/makeNstr.Rd |
312 | 312 | 1f4cb5e4cb669550dc4aca2745280286 *man/mdb.get.Rd |
313 | 313 | ad5ca5884567e50edeba874e3f6e0566 *man/mgp.axis.Rd |
329 | 329 | a3aed45d350c39121d61700f94e859cb *man/plotCorrPrecision.Rd |
330 | 330 | 88d93c5117d432cbe4ba996c5c74d0d8 *man/plotlyM.Rd |
331 | 331 | 81937c2b724d0ec42f817ebb88748e70 *man/plsmo.Rd |
332 | 4af8df34929b776410ae3b007f01a15f *man/popower.Rd | |
332 | a05ef4564d6773ed63e6430f9d52eae7 *man/popower.Rd | |
333 | 333 | 52be83076b1f0442cb5ab5c15bb16a3f *man/print.char.list.Rd |
334 | 334 | 0a25e1c6f349789159b7239ae0f0f620 *man/print.char.matrix.Rd |
335 | 335 | 057da98d466a023bda3991abbf880855 *man/prnz.Rd |
409 | 409 | 2d0aa4a90313d361f628383dd5fcf7fb *src/mChoice.c |
410 | 410 | 703f73252fe6efaf8244b0713aaabe6b *src/maxempr.f |
411 | 411 | 69d3a08b2cd911161ba22af68f97f611 *src/nstr.c |
412 | f698976ca9ef8a852edd2c37939b66a2 *src/ranksort.c | |
412 | 5fd3cecbf580b3cb32f365f1f9036794 *src/ranksort.c | |
413 | 413 | df53032c14b9c8a41bfe9529411c7729 *src/ratfor/cidxcn.r |
414 | 414 | ebb3e56a96c8678a2e3184d176af9926 *src/ratfor/cidxcp.r |
415 | 415 | 4549893e527bae0e3140b29579c74720 *src/ratfor/hoeffd.r |
0 | export("%nin%",.q,abs.error.pred,addMarginal,all.digits,all.is.numeric,approxExtrap,areg,areg.boot,aregImpute,aregTran,arrGrob,as.discrete,asNumericMatrix,ballocation,bezier,binconf,biVar,bootkm,bpower,bpower.sim,bpplot,bpplotM,bpplt,bppltp,bpx,bsamsize,bystats,bystats2,capitalize,catTestchisq,Cbind,ceil,character.table,chiSquare,ciapower,cleanup.import,clowess,cnvrt.coords,code.levels,colorFacet,combine.levels,combineLabels,combplotp,confbar,consolidate,contents,conTestkw,cpower,Cs,csv.get,cumcategory,curveRep,curveSmooth,cut2,datadensity,dataDensityString,dataframeReduce,dataRep,ddmmmyy,deff,describe,discrete,dhistboxp,dotchart2,dotchart3,dotchartp,dotchartpl,Dotplot,drawPlot,dvi,dvigv,dvips,ecdfpM,Ecdf,equalBins,errbar,escapeBS,escapeRegex,estSeqMarkovOrd,estSeqSim,event.chart,event.convert,event.history,expr.tree,fillin,find.matches,first.word,fit.mult.impute,format.df,format.pval,formatCats,formatCons,formatDateTime,formatdescribeSingle,formatSep,formatTestStats,ftupwr,ftuss,Function,gbayes,gbayes1PowerNP,gbayes2,gbayesMixPost,gbayesMixPowerNP,gbayesMixPredNoData,gbayesSeqSim,get2rowHeads,getHdata,getLatestSource,GetModelFrame,getRs,getZip,ggfreqScatter,ggplotlyr,GiniMd,Gompertz2,groupn,grType,hdquantile,hidingTOC,hist.data.frame,histbackback,histboxp,histboxpM,histSpike,histSpikeg,hoeffd,html,htmlGreek,htmlSN,htmlSpecial,htmlSpecialType,htmlTranslate,htmlVerbatim,importConvertDateTime,improveProb,impute,impute.transcan,inmChoice,intMarkovOrd,inverseFunction,invertTabulated,is.discrete,is.imputed,is.mChoice,is.present,is.special.miss,james.stein,jitter2,keepHattrib,Key,Key2,km.quick,knitrSet,labcurve,label,Label,labelLatex,labelPlotmath,Lag,largest.empty,latex,latexBuild,latexCheckOptions,latexDotchart,latexNeedle,latexSN,latexTabular,latexTherm,latexTranslate,latexVerbatim,list.tree,llist,lm.fit.qr.bare,Load,Lognorm2,logrank,lookupSASContents,lrcum,makeNames,makeNstr,makeSteps,mApply,markupSpecs,mask,match.mChoice,matchCases,matrix2dataFrame,matxv,mbarclPanel,mbarclpl,mChoice,mdb.get,Mean,medvPanel,medvpl,Merge,mgp.axis,mgp.axis.labels,mhgr,minor.tick,monotone,monthDays,mtitle,multEventChart,multLines,na.delete,na.detail.response,na.include,na.keep,na.pattern,na.retain,naclus,nafitted.delete,Names2names,naplot,napredict.delete,naprint.delete,naprint.keep,naresid.delete,naresid.keep,nFm,nobsY,nomiss,nstr,num.denom.setup,num.intercepts,numeric.string,numericScale,oPar,optionsCmds,ordGridFun,ordTestpo,outerText,pairUpDiff,panel.bpplot,panel.Dotplot,panel.Ecdf,panel.plsmo,panel.xYplot,parGrid,partition.matrix,partition.vector,pasteFit,pBlock,pc1,plotCorrM,plotCorrPrecision,plotp,plotlyM,plotlyParm,plotlySave,plotmathTranslate,plotMultSim,plotpsummaryM,plsmo,pngNeedle,pomodm,popower,posamsize,prepanel.Dotplot,prepanel.Ecdf,prepanel.xYplot,print.char.matrix,prList,prn,propsPO,propsTrans,prselect,prType,pstamp,putHcap,putHfig,putKey,putKeyEmpty,Quantile,Quantile2,R2Measures,rcorr,rcorr.cens,rcorrcens,rcorrp.cens,rcspline.eval,rcspline.plot,rcspline.restate,rcsplineFunction,read.xportDataload,readSAScsv,redun,reformM,reLabelled,replace.substring.wild,reShape,responseSummary,restoreHattrib,rlegend,rlegendg,rm.boot,rMultinom,roundN,roundPOSIXt,samplesize.bin,sas.codes,sas.get,sas.get.macro,sasdsLabels,sasxport.get,Save,scat1d,score.binary,sedit,sepUnitsTrans,setParNro,setTrellis,show.col,show.pch,showPsfrag,simMarkovOrd,simplifyDims,simPOcuts,simRegOrd,sKey,smean.cl.boot,smean.cl.normal,smean.sd,smean.sdl,smearingEst,smedian.hilow,solvet,somers2,soprobMarkovOrd,soprobMarkovOrdm,spearman,spearman.test,spearman2,spower,spss.get,src,stat_plsmo,stata.get,StatPlsmo,stepfun.eval,stratify,strgraphwrap,string.bounding.box,string.break.line,stringDims,stripChart,subplot,substi,substi.source,substring.location,substring2,summarize,summaryD,summaryDp,summaryM,summaryP,summaryRc,summaryS,symbol.freq,sys,t.test.cluster,table_formatpct,table_freq,table_latexdefs,table_N,table_pc,table_trio,tabulr,termsDrop,testDateTime,tex,tobase64image,transace,transcan,translate,trap.rule,trellis.strip.blank,truncPOSIXt,uncbind,units,unPaste,upData,upFirst,valueLabel,valueName,valueTags,valueUnit,var.inner,varclus,Weibull2,whichClosek,whichClosePW,whichClosest,wtd.Ecdf,wtd.loess.noiter,wtd.mean,wtd.quantile,wtd.rank,wtd.table,wtd.var,xInch,xless,xy.group,xYplot,xySortNoDupNoNA,yearDays,yInch,ynbind,zoom,"[<-.discrete","consolidate<-","is.na<-.discrete","label<-","length<-.discrete","substring2<-","valueLabel<-","valueName<-","valueTags<-","valueUnit<-") | |
0 | export("%nin%",.q,abs.error.pred,addMarginal,all.digits,all.is.numeric,approxExtrap,areg,areg.boot,aregImpute,aregTran,arrGrob,as.discrete,asNumericMatrix,ballocation,bezier,binconf,biVar,bootkm,bpower,bpower.sim,bpplot,bpplotM,bpplt,bppltp,bpx,bsamsize,bystats,bystats2,capitalize,catTestchisq,Cbind,ceil,character.table,chiSquare,ciapower,cleanup.import,clowess,cnvrt.coords,code.levels,colorFacet,combine.levels,combineLabels,combplotp,confbar,consolidate,contents,conTestkw,cpower,Cs,csv.get,cumcategory,curveRep,curveSmooth,cut2,datadensity,dataDensityString,dataframeReduce,dataRep,ddmmmyy,deff,describe,discrete,dhistboxp,dotchart2,dotchart3,dotchartp,dotchartpl,Dotplot,drawPlot,dvi,dvigv,dvips,ecdfpM,Ecdf,equalBins,errbar,escapeBS,escapeRegex,estSeqMarkovOrd,estSeqSim,event.chart,event.convert,event.history,expr.tree,fillin,find.matches,first.word,fit.mult.impute,format.df,format.pval,formatCats,formatCons,formatDateTime,formatdescribeSingle,formatSep,formatTestStats,ftupwr,ftuss,Function,gbayes,gbayes1PowerNP,gbayes2,gbayesMixPost,gbayesMixPowerNP,gbayesMixPredNoData,gbayesSeqSim,get2rowHeads,getHdata,getLatestSource,GetModelFrame,getRs,getZip,ggfreqScatter,ggplotlyr,GiniMd,Gompertz2,groupn,grType,hdquantile,hidingTOC,hist.data.frame,histbackback,histboxp,histboxpM,histSpike,histSpikeg,hoeffd,html,htmlGreek,htmlSN,htmlSpecial,htmlSpecialType,htmlTranslate,htmlVerbatim,importConvertDateTime,improveProb,impute,impute.transcan,inmChoice,inmChoicelike,intMarkovOrd,inverseFunction,invertTabulated,is.discrete,is.imputed,is.mChoice,is.present,is.special.miss,james.stein,jitter2,keepHattrib,Key,Key2,km.quick,knitrSet,labcurve,label,Label,labelLatex,labelPlotmath,Lag,largest.empty,latex,latexBuild,latexCheckOptions,latexDotchart,latexNeedle,latexSN,latexTabular,latexTherm,latexTranslate,latexVerbatim,list.tree,llist,lm.fit.qr.bare,Load,Lognorm2,logrank,lookupSASContents,lrcum,makeNames,makeNstr,makeSteps,mApply,markupSpecs,mask,match.mChoice,matchCases,matrix2dataFrame,matxv,mbarclPanel,mbarclpl,mChoice,mdb.get,Mean,medvPanel,medvpl,Merge,mgp.axis,mgp.axis.labels,mhgr,minor.tick,monotone,monthDays,mtitle,multEventChart,multLines,na.delete,na.detail.response,na.include,na.keep,na.pattern,na.retain,naclus,nafitted.delete,Names2names,naplot,napredict.delete,naprint.delete,naprint.keep,naresid.delete,naresid.keep,nFm,nmChoice,nobsY,nomiss,nstr,num.denom.setup,num.intercepts,numeric.string,numericScale,oPar,optionsCmds,ordGridFun,ordTestpo,outerText,pairUpDiff,panel.bpplot,panel.Dotplot,panel.Ecdf,panel.plsmo,panel.xYplot,parGrid,partition.matrix,partition.vector,pasteFit,pBlock,pc1,plotCorrM,plotCorrPrecision,plotp,plotlyM,plotlyParm,plotlySave,plotmathTranslate,plotMultSim,plotpsummaryM,plsmo,pngNeedle,pomodm,popower,posamsize,prepanel.Dotplot,prepanel.Ecdf,prepanel.xYplot,print.char.matrix,prList,prn,propsPO,propsTrans,prselect,prType,pstamp,putHcap,putHfig,putKey,putKeyEmpty,Quantile,Quantile2,R2Measures,rcorr,rcorr.cens,rcorrcens,rcorrp.cens,rcspline.eval,rcspline.plot,rcspline.restate,rcsplineFunction,read.xportDataload,readSAScsv,redun,reformM,reLabelled,replace.substring.wild,reShape,responseSummary,restoreHattrib,rlegend,rlegendg,rm.boot,rMultinom,roundN,roundPOSIXt,samplesize.bin,sas.codes,sas.get,sas.get.macro,sasdsLabels,sasxport.get,Save,scat1d,score.binary,sedit,sepUnitsTrans,setParNro,setTrellis,show.col,show.pch,showPsfrag,simMarkovOrd,simplifyDims,simPOcuts,simRegOrd,sKey,smean.cl.boot,smean.cl.normal,smean.sd,smean.sdl,smearingEst,smedian.hilow,solvet,somers2,soprobMarkovOrd,soprobMarkovOrdm,spearman,spearman.test,spearman2,spower,spss.get,src,stat_plsmo,stata.get,StatPlsmo,stepfun.eval,stratify,strgraphwrap,string.bounding.box,string.break.line,stringDims,stripChart,subplot,substi,substi.source,substring.location,substring2,summarize,summaryD,summaryDp,summaryM,summaryP,summaryRc,summaryS,symbol.freq,sys,t.test.cluster,table_formatpct,table_freq,table_latexdefs,table_N,table_pc,table_trio,tabulr,termsDrop,testDateTime,tex,tobase64image,transace,transcan,translate,trap.rule,trellis.strip.blank,truncPOSIXt,uncbind,units,unPaste,upData,upFirst,valueLabel,valueName,valueTags,valueUnit,var.inner,varclus,Weibull2,whichClosek,whichClosePW,whichClosest,wtd.Ecdf,wtd.loess.noiter,wtd.mean,wtd.quantile,wtd.rank,wtd.table,wtd.var,xInch,xless,xy.group,xYplot,xySortNoDupNoNA,yearDays,yInch,ynbind,zoom,"[<-.discrete","consolidate<-","is.na<-.discrete","label<-","length<-.discrete","substring2<-","valueLabel<-","valueName<-","valueTags<-","valueUnit<-") | |
1 | 1 | |
2 | 2 | useDynLib(Hmisc, .registration=TRUE, .fixes="F_") |
3 | 3 |
0 | Changes in version 4.7-1 (2022-08-13} | |
0 | Changes in version 4.7-2 (2022-11-18) | |
1 | * grType: changed to use find.package() instead of the slow installed.packages() (thanks: Uwe Ligges) | |
2 | * latex.default: changed to by default omit the LaTeX comment; specify options(omitlatexcom=FALSE) to get original behavior | |
3 | * ggplot.transcan: corrected color/color assignments; thanks: David Norris | |
4 | * restoreHattrib: fixed to ignore attributes for variables that are not in obj | |
5 | * popower: fixed URL for Live Free or Dichotomize | |
6 | * getRs: improved to use rstudioapi to load the file into a script editor window | |
7 | * mChoice: added ignoreNA argument and made new default behavior ignoreNA=TRUE unlike the prior versions; made value (appearing with semicolons) null instead of 0 when no choice was selected, which makes option add.none finally work | |
8 | * mChoice: added condition argument to intersect all values instead of unioning them | |
9 | * mChoicelike: new function like inmChoice but allowing matching on pieces of labels and optionally ignoring the case | |
10 | * nmChoice: new function to compute the number of choices that were made per observation | |
11 | * describe: fixed length > 1 problem with check for timeDate class | |
12 | * Merge: better error message if unexpected variable from non-id-variable overlap | |
13 | * all.is.numeric: corrected to return TRUE is the only non-NA values after converting to numeric were originally NA, addedd what='nonnum' argument | |
14 | ||
15 | Changes in version 4.7-1 (2022-08-13) | |
1 | 16 | * plot.describe: added bvspace argument to control spacing between categorical variables |
2 | 17 | * getRs: changed default put argument to 'source', changed RStudio code |
3 | 18 | * html.contents.data.frame: changed long space to   to render in more browser |
92 | 92 | x <- M[[i]] |
93 | 93 | ni <- nm[i] |
94 | 94 | changed <- FALSE |
95 | if(ni %nin% names(lab)) | |
96 | stop(paste('Unexpected variable:', ni)) | |
95 | 97 | if(lab[ni] != '' && ! length(attr(x, 'label'))) { |
96 | 98 | label(x) <- lab[ni] |
97 | 99 | changed <- TRUE |
236 | 236 | res |
237 | 237 | } |
238 | 238 | |
239 | all.is.numeric <- function(x, what=c('test','vector'), | |
239 | all.is.numeric <- function(x, what=c('test','vector','nonnum'), | |
240 | 240 | extras=c('.','NA')) |
241 | 241 | { |
242 | 242 | what <- match.arg(what) |
243 | 243 | x <- sub('[[:space:]]+$', '', x) |
244 | 244 | x <- sub('^[[:space:]]+', '', x) |
245 | xs <- x[x %nin% c('',extras)] | |
246 | if(! length(xs)) return(if(what == 'test') FALSE else x) | |
247 | isnum <- suppressWarnings(!any(is.na(as.numeric(xs)))) | |
248 | if(what=='test') | |
249 | isnum | |
250 | else if(isnum) | |
251 | as.numeric(x) | |
252 | else x | |
245 | xs <- x[x %nin% c('', extras)] | |
246 | if(! length(xs) || all(is.na(x))) | |
247 | return(switch(what, test = FALSE, vector=x, nonnum=x[0])) | |
248 | isnon <- suppressWarnings(! is.na(xs) & is.na(as.numeric(xs))) | |
249 | isnum <- ! any(isnon) | |
250 | # suppressWarnings below handles extras present in x | |
251 | switch(what, | |
252 | test = isnum, | |
253 | vector = if(isnum) suppressWarnings(as.numeric(x)) else x, | |
254 | nonnum = xs[isnon]) | |
253 | 255 | } |
254 | 256 | |
255 | 257 | Lag <- function(x, shift=1) |
1671 | 1673 | |
1672 | 1674 | if(localrepo) file.copy(paste(where, file, sel='/'), file) |
1673 | 1675 | else download.file.HTTPS(paste(where, file, sep='/'), file) |
1674 | file.edit(file) | |
1676 | if(requireNamespace('rstudioapi', quietly=TRUE) && | |
1677 | rstudioapi::isAvailable()) rstudioapi::navigateToFile(file) | |
1678 | else file.edit(file) | |
1675 | 1679 | invisible() |
1676 | 1680 | } |
1677 | 1681 | |
1835 | 1839 | |
1836 | 1840 | |
1837 | 1841 | grType <- function() { |
1838 | if('plotly' %nin% utils::installed.packages()[,1]) return('base') | |
1842 | if(! length(find.package('plotly', quiet=TRUE))) return('base') | |
1839 | 1843 | if(length(g <- .Options$grType) && g == 'plotly') 'plotly' else 'base' |
1840 | 1844 | } |
1841 | 1845 | |
1948 | 1952 | } |
1949 | 1953 | |
1950 | 1954 | restoreHattrib <- function(obj, attribs) { |
1955 | nam <- names(obj) | |
1951 | 1956 | for(n in names(attribs)) { |
1952 | 1957 | a <- attribs[[n]] |
1953 | 1958 | if(length(a)) { |
1954 | 1959 | sv <- n == '.single.variable.' |
1955 | x <- if(sv) obj else obj[[n]] | |
1956 | if(length(a$label)) label(x) <- a$label | |
1957 | if(length(a$units)) units(x) <- a$units | |
1958 | if(sv) return(x) | |
1959 | obj[[n]] <- x | |
1960 | if(sv || n %in% nam) { | |
1961 | x <- if(sv) obj else obj[[n]] | |
1962 | if(length(a$label)) label(x) <- a$label | |
1963 | if(length(a$units)) units(x) <- a$units | |
1964 | if(sv) return(x) | |
1965 | obj[[n]] <- x | |
1966 | } | |
1960 | 1967 | } |
1961 | 1968 | } |
1962 | 1969 | obj |
222 | 222 | if(n.unique >= 5) { |
223 | 223 | loandhi <- x.unique[c(1 : 5, (n.unique - 4) : n.unique)] |
224 | 224 | extremes <- |
225 | if(isdot && (class(loandhi) %nin% 'timeDate')) { | |
225 | if(isdot && all(class(loandhi) %nin% 'timeDate')) { | |
226 | 226 | formatDateTime(unclass(loandhi), at=atx, roundDay=! timeUsed) |
227 | 227 | } else if(isnum) loandhi else format(format(loandhi), ...) |
228 | 228 | names(extremes) <- c("L1","L2","L3","L4","L5","H5","H4","H3","H2","H1") |
568 | 568 | |
569 | 569 | ## pandoc used by R Markdown gets fooled by LaTeX comments |
570 | 570 | olc <- getOption('omitlatexcom') |
571 | if(! length(olc) || ! olc) | |
571 | if(length(olc) && olc) | |
572 | 572 | cat("%", deparse(sys.call()), "%\n", file=file, append=file != '', sep='') |
573 | 573 | |
574 | 574 | if(dcolumn) { |
0 | # $Id$ | |
1 | 0 | mChoice <- function(..., label='', |
2 | 1 | sort.levels=c('original','alphabetic'), |
3 | add.none=FALSE, drop=TRUE) | |
2 | add.none=FALSE, drop=TRUE, ignoreNA=TRUE) | |
4 | 3 | { |
5 | 4 | sort.levels <- match.arg(sort.levels) |
6 | 5 | dotlist <- list(...) |
8 | 7 | if (drop) |
9 | 8 | lev <- unique(as.character(unlist(dotlist))) |
10 | 9 | else |
11 | lev <- unique(unlist(lapply(dotlist, function(x)levels(as.factor(x))))) | |
12 | ||
10 | lev <- unique(unlist(lapply(dotlist, function(x) levels(as.factor(x))))) | |
11 | if(ignoreNA) lev <- setdiff(lev, NA) | |
13 | 12 | if(sort.levels=='alphabetic') lev <- sort(lev) |
14 | 13 | |
15 | 14 | lev <- setdiff(lev,'') |
16 | 15 | |
17 | 16 | vcall <- as.character(sys.call())[-1] |
18 | ||
19 | dotlist <- lapply(dotlist, FUN=match, table=lev, nomatch=0) | |
20 | ||
17 | dotlist <- lapply(dotlist, FUN=match, table=lev) #, nomatch=0) | |
18 | ||
21 | 19 | g <- function(...) { |
22 | 20 | set <- c(...) |
23 | 21 | set <- set[!is.na(set)] |
24 | ||
25 | 22 | if(!length(set)) return('') |
26 | 23 | |
27 | 24 | paste(sort(unique(set)), collapse=';') |
154 | 151 | X |
155 | 152 | } |
156 | 153 | |
154 | nmChoice <- function(object) { | |
155 | y <- gsub('[^;]', '', object) | |
156 | nchoices <- nchar(y) + 1 | |
157 | nchoices[object == ''] <- 0 | |
158 | nchoices | |
159 | } | |
160 | ||
157 | 161 | summary.mChoice <- function(object, ncombos=5, minlength=NULL, |
158 | 162 | drop=TRUE, ...) { |
159 | 163 | nunique <- length(unique(object)) |
208 | 212 | # inmChoice <- function(x, values) { |
209 | 213 | # match.mChoice(values, x, nomatch=0) > 0 |
210 | 214 | # } |
211 | inmChoice <- function(x, values) { | |
215 | inmChoice <- function(x, values, condition=c('any', 'all')) { | |
216 | condition <- match.arg(condition) | |
212 | 217 | lev <- attr(x, 'levels') |
213 | 218 | if(is.character(values)) { |
214 | 219 | v <- match(values, lev) |
218 | 223 | } |
219 | 224 | x <- paste(';', unclass(x), ';', sep='') |
220 | 225 | values <- paste(';', values, ';', sep='') |
221 | res <- rep(FALSE, length(x)) | |
226 | res <- rep(condition != 'any', length(x)) | |
222 | 227 | for(j in 1:length(values)) { |
223 | 228 | i <- grep(values[j], x) |
224 | if(length(i)) res[i] <- TRUE | |
229 | if(length(i)) { | |
230 | if(condition == 'any') res[i] <- TRUE | |
231 | else | |
232 | res[-i] <- FALSE | |
233 | } else if(condition == 'all') res[] <- FALSE | |
225 | 234 | } |
226 | 235 | res |
227 | 236 | } |
228 | 237 | |
238 | inmChoicelike <- function(x, values, condition=c('any', 'all'), | |
239 | ignore.case=FALSE, fixed=FALSE) { | |
240 | condition <- match.arg(condition) | |
241 | if(! is.character(values)) stop('values must be a character vector') | |
242 | x <- as.character(x) | |
243 | res <- rep(condition != 'any', length(x)) | |
244 | for(j in 1 : length(values)) { | |
245 | i <- grep(values[j], x, ignore.case=ignore.case, fixed=fixed) | |
246 | if(length(i)) { | |
247 | if(condition == 'any') res[i] <- TRUE | |
248 | else | |
249 | res[-i] <- FALSE | |
250 | } else if(condition == 'all') res[] <- FALSE | |
251 | } | |
252 | res | |
253 | } | |
254 | ||
255 | ||
229 | 256 | is.mChoice <- function(x) inherits(x, 'mChoice') |
1287 | 1287 | lab=lab, type='transform')) |
1288 | 1288 | } |
1289 | 1289 | } |
1290 | ||
1291 | # scale*manual calls are from David Norris | |
1292 | # The implicit (alphabetical) order of 'imputed' and 'transform' | |
1293 | # reverses the intended symbol & color assignments. But naming | |
1294 | # the vectors corrects this. | |
1295 | ||
1290 | 1296 | ggplot(data, aes(x=x, y=y, color=type, shape=type, size=type)) + geom_point() + |
1291 | 1297 | facet_wrap(~ X, scales=if(scale) 'free_x' else 'free', ...) + |
1292 | 1298 | xlab(NULL) + ylab('Transformed') + |
1293 | scale_color_manual(values=c('#00000059', '#FF000059')) + | |
1294 | scale_shape_manual(values=c(1, 3)) + | |
1295 | scale_size_manual(values=c(1.3, 2.25)) + | |
1299 | scale_color_manual(values = c(transform="#00000059", imputed="#FF000059")) + | |
1300 | scale_shape_manual(values = c(transform=1, imputed=3)) + | |
1301 | scale_size_manual(values = c(transform=1.3, imputed=2.25)) + | |
1296 | 1302 | theme(legend.position='none') + |
1297 | 1303 | geom_text(data=adata, aes(label=lab), parse=TRUE, size=1.65, col='black') |
1298 | 1304 | } |
6 | 6 | numeric vector. Leading and trailing blanks in \code{x} are ignored. |
7 | 7 | } |
8 | 8 | \usage{ |
9 | all.is.numeric(x, what = c("test", "vector"), extras=c('.','NA')) | |
9 | all.is.numeric(x, what = c("test", "vector", "nonnum"), extras=c('.','NA')) | |
10 | 10 | } |
11 | 11 | \arguments{ |
12 | 12 | \item{x}{a character vector} |
13 | 13 | \item{what}{specify \code{what="vector"} to return a numeric vector if |
14 | it passes the test, or the original character vector otherwise} | |
14 | it passes the test, or the original character vector otherwise, the | |
15 | default \code{"test"} to return \code{FALSE} if there are no | |
16 | non-missing non-\code{extra} values of \code{x} or there is at least | |
17 | one non-numeric value of \code{x}, or \code{"nonnum"} to return the | |
18 | vector of non-\code{extra}, non-NA, non-numeric values of \code{x}.} | |
15 | 19 | \item{extras}{a vector of character strings to count as numeric |
16 | 20 | values, other than \code{""}.} |
17 | 21 | } |
24 | 28 | all.is.numeric(c('1','1.2','3'),'vector') |
25 | 29 | all.is.numeric(c('1','1.2','3a'),'vector') |
26 | 30 | all.is.numeric(c('1','',' .'),'vector') |
31 | all.is.numeric(c('1', '1.2', '3a'), 'nonnum') | |
27 | 32 | } |
28 | 33 | \keyword{character} |
35 | 35 | minor categories available. Specify a character string to list |
36 | 36 | all scripts whose major category contains the string (ignoring |
37 | 37 | case).} |
38 | \item{put}{Leave at the default (\code{'rstudio'}) to load \code{file} | |
39 | into the RStudio script editor window. Use \code{put='source'} to | |
40 | \code{source()} the file. This is useful when the file just defines | |
41 | a function you want to use in the session.} | |
38 | \item{put}{Leave at the default (\code{'source'}) to \code{source()} the file. This is useful when the file just defines a function you want to use in the session. Use load \code{put='rstudio'} to load the file into the RStudio script editor window using the \code{rstudioapi} \code{navigateToFile} function. If RStudio is not running, \code{file.edit()} is used instead.} | |
42 | 39 | } |
43 | 40 | \value{a data frame or list, depending on arguments} |
44 | 41 | \author{Frank Harrell and Cole Beck} |
45 | 45 | \details{ |
46 | 46 | \code{hidingTOC} creates a table of contents in a Rmd document that |
47 | 47 | can be hidden at the press of a button. It also generate buttons that allow |
48 | the hiding or unhiding of the diffrent level depths of the table of contents. | |
48 | the hiding or unhiding of the diffrent level depths of the table of | |
49 | contents. For \code{quarto}-related methods see \url{https://stackoverflow.com/questions/73999697}. | |
49 | 50 | } |
50 | 51 | \examples{ |
51 | 52 | \dontrun{ |
547 | 547 | commands which are assumed to be in the system path. |
548 | 548 | } |
549 | 549 | \details{ |
550 | \command{latex.default} outputs a LaTeX comment containing the calling | |
551 | statement. To suppress outputting this comment, run | |
552 | \command{options(omitlatexcom=TRUE)} before running. This is helpful | |
550 | \command{latex.default} optionally outputs a LaTeX comment containing the calling | |
551 | statement. To output this comment, run | |
552 | \command{options(omitlatexcom=FALSE)} before running. The default behavior or suppressing the comment is helpful | |
553 | 553 | when running RMarkdown to produce pdf output using LaTeX, as this uses |
554 | 554 | \command{pandoc} which is fooled into try to escape the percent |
555 | 555 | comment symbol. |
5 | 5 | \alias{as.character.mChoice} |
6 | 6 | \alias{as.double.mChoice} |
7 | 7 | \alias{inmChoice} |
8 | \alias{inmChoicelike} | |
9 | \alias{nmChoice} | |
8 | 10 | \alias{match.mChoice} |
9 | 11 | \alias{[.mChoice} |
10 | 12 | \alias{print.summary.mChoice} |
49 | 51 | contains at least one of the codes or value labels in the second |
50 | 52 | argument. |
51 | 53 | |
52 | \code{match.mChoice} creats an integer vector of the indexes of all | |
54 | \code{match.mChoice} creates an integer vector of the indexes of all | |
53 | 55 | elements in \code{table} which contain any of the speicified levels |
56 | ||
57 | \code{nmChoice} returns an integer vector of the number of choices | |
58 | that were made | |
54 | 59 | |
55 | 60 | \code{is.mChoice} returns \code{TRUE} is the argument is a multiple |
56 | 61 | choice variable. |
58 | 63 | \usage{ |
59 | 64 | mChoice(\dots, label='', |
60 | 65 | sort.levels=c('original','alphabetic'), |
61 | add.none=FALSE, drop=TRUE) | |
66 | add.none=FALSE, drop=TRUE, ignoreNA=TRUE) | |
62 | 67 | |
63 | 68 | \method{format}{mChoice}(x, minlength=NULL, sep=";", \dots) |
64 | 69 | |
77 | 82 | |
78 | 83 | match.mChoice(x, table, nomatch=NA, incomparables=FALSE) |
79 | 84 | |
80 | inmChoice(x, values) | |
85 | inmChoice(x, values, condition=c('any', 'all')) | |
86 | ||
87 | inmChoicelike(x, values, condition=c('any', 'all'), | |
88 | ignore.case=FALSE, fixed=FALSE) | |
89 | ||
90 | nmChoice(object) | |
81 | 91 | |
82 | 92 | is.mChoice(x) |
83 | 93 | |
119 | 129 | set \code{drop=FALSE} to keep unused factor levels as columns of the matrix |
120 | 130 | produced by \code{mChoice} |
121 | 131 | } |
132 | \item{ignoreNA}{set to \code{FALSE} to keep any \code{NA}s present in | |
133 | data as a real level. Prior to Hmisc 4.7-2 \code{FALSE} was the default.} | |
122 | 134 | \item{x}{ |
123 | 135 | an object of class \code{"mchoice"} such as that created by |
124 | 136 | \code{mChoice}. For \code{is.mChoice} is any object. |
153 | 165 | \item{values}{ |
154 | 166 | a scalar or vector. If \code{values} is integer, it is |
155 | 167 | the choice codes, and if it is a character vector, it is assumed to |
156 | be value labels. | |
157 | } | |
168 | be value labels. For \code{inmChoicelike} \code{values} must be | |
169 | character strings which are pieces of choice labels. | |
170 | } | |
171 | \item{condition}{set to \code{'all'} for \code{inmChoice} to require | |
172 | that all choices in \code{values} be present instead of the default of | |
173 | any of them present.} | |
174 | \item{ignore.case}{set to \code{TRUE} to have \code{inmChoicelike} | |
175 | ignore case in the data when matching on \code{values}} | |
176 | \item{fixed}{see \code{grep}} | |
158 | 177 | } |
159 | 178 | \value{ |
160 | 179 | \code{mChoice} returns a character vector of class \code{"mChoice"} |
161 | 180 | plus attributes \code{"levels"} and \code{"label"}. |
162 | 181 | \code{summary.mChoice} returns an object of class |
163 | \code{"summary.mChoice"}. \code{inmChoice} returns a logical vector. | |
182 | \code{"summary.mChoice"}. \code{inmChoice} and \code{inmChoicelike} | |
183 | return a logical vector. | |
164 | 184 | \code{format.mChoice} returns a character vector, and |
165 | 185 | \code{as.double.mChoice} returns a binary numeric matrix. |
186 | \code{nmChoice} returns an integer vector | |
166 | 187 | } |
167 | 188 | \author{ |
168 | 189 | Frank Harrell |
197 | 218 | print(Symptoms, long=TRUE) |
198 | 219 | format(Symptoms[1:5]) |
199 | 220 | inmChoice(Symptoms,'Headache') |
221 | inmChoicelike(Symptoms, 'head', ignore.case=TRUE) | |
200 | 222 | levels(Symptoms) |
201 | 223 | inmChoice(Symptoms, 3) |
224 | # Find all subjects with either of two symptoms | |
202 | 225 | inmChoice(Symptoms, c('Headache','Hangnail')) |
203 | 226 | # Note: In this example, some subjects have the same symptom checked |
204 | 227 | # multiple times; in practice these redundant selections would be NAs |
205 | 228 | # mChoice will ignore these redundant selections |
229 | # Find all subjects with both symptoms | |
230 | inmChoice(Symptoms, c('Headache', 'Hangnail'), condition='all') | |
206 | 231 | |
207 | 232 | meanage <- N <- numeric(5) |
208 | 233 | for(j in 1:5) { |
41 | 41 | |
42 | 42 | \code{multEventChart} uses \code{\link{ggplot2}} to plot event charts |
43 | 43 | showing state transitions, account for absorbing states/events. It is |
44 | based on code written by Lucy D'Agostino McGowan posted at \url{https://livefreeordichotomize.com/2020/05/21/survival-model-detective-1}. | |
44 | based on code written by Lucy D'Agostino McGowan posted at \url{https://livefreeordichotomize.com/posts/2020-05-21-survival-model-detective-1/}. | |
45 | 45 | |
46 | 46 | } |
47 | 47 | \usage{ |
0 | 0 | #include "R.h" |
1 | 1 | |
2 | void sort2(np,ra,rb) | |
3 | int *np; | |
4 | double ra[]; | |
5 | int rb[]; | |
2 | void sort2(int *np, double ra[], int rb[]) | |
6 | 3 | { |
7 | 4 | int l,j,ir,i,n,rrb,*xrb; |
8 | 5 | double rra,*xra; |
45 | 42 | } |
46 | 43 | |
47 | 44 | |
48 | void crank(np, w) | |
49 | int *np; | |
50 | double w[]; | |
51 | ||
45 | void crank(int *np, double w[]) | |
52 | 46 | { |
53 | 47 | int n,j=1,ji,jt; |
54 | 48 | double rank,*xw; |
72 | 66 | } |
73 | 67 | |
74 | 68 | |
75 | void F77_SUB(rank)(np, x, w, ix, r) | |
76 | int *np, ix[]; | |
77 | double x[],r[],w[]; | |
78 | ||
69 | void F77_SUB(rank)(int *np, double x[], double w[], int ix[], double r[]) | |
79 | 70 | { |
80 | 71 | int n, *xix, i; |
81 | 72 | double *xx, *xr, *xw; |