DescTools (version 0.99.8.1)

DescTools-package: Tools for Efficient Descriptive Statistics

Description

DescTools contains a bunch of basic statistic functions and convenience wrappers for efficiently describing data, creating specific plots and using MS-Office (Word, Excel or PowerPoint) for doing reports. The package's intention is to assemble a toolbox with basic functions to facilitate the (notoriously time consuming) first descriptive tasks in data analysis, consisting of calculating descriptive statistics, drawing graphical summaries and reporting the results. Many of the included functions can be found scattered in other packages and other sources written partly by Titans of R. The reason for collecting them here, was primarily to have them consolidated in ONE instead of dozens of packages (which themselves might depend on other packages which are not needed at all), and to provide a common and consistent interface as far as function and arguments naming, NA handling, recycling rules etc. are concerned. In this sense this is my "Best-of"-collection of R-functions, I've happened to need in recent years. Google styleguides were used as naming rules (in absence of convincing alternatives). The 'CamelStyle' was consequently applied to functions borrowed from contributed R packages as well. Feedback, feature requests, bugreports and other suggestions are welcome!

Arguments

MS-Office

To make use of MS-Office features you must have Office in one of its variants installed. All Wrd*, XL* and Pp* functions require as well the package RDCOMClient to be installed. Hence the use of these functions is restricted to Windows systems. RDCOMClient is available at: http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.0/. RDCOMClient does not exist for Mac or Linux, sorry.

Warning

This package is still under development. Although the code seems meanwhile quite stable, until release of version 1.0 (which is expected by the dawn of 2015) you should be aware that everything in the package might be subject to change. Backward compatibility is not yet guaranteed. Functions may be deleted or renamed and new syntax may be inconsistent with earlier versions. By release of version 1.0 the "deprecated-defunct process" will be installed.

Details

ll{ Package: DescTools Type: Package Title: Tools for descriptive statistics Version: 0.99.8.1 Date: 2014-12-21 Suggests: RDCOMClient, manipulate Depends: R (>= 3.1.0) Imports: boot, tcltk License: GPL (>= 2) LazyLoad: yes LazyData: yes ByteCompile: yes NeedsCompilation: yes } A grouped list of the functions: ll{ Operators, calculus, transformations: %()% Between operators: %()%, %(]%, %[)%, %[]% %)(% and their negations: %)(%, %](%, %)[%, %][% %nin% "not in" operator %overlaps% Determines whether two collections have common elements %like% Simple operator to search for a specified pattern AUC Calculate area under the curve Primes Find all primes less than n Factorize Prime factorization of integers GCD Calculate the greatest common divisor LCM Calculate the least common multiple Permn Determine all possible permutations of a set Fibonacci Generates single Fibonacci numbers or a Fibonacci sequence Frac Return the fractional part of a numeric value Ndec Count decimal places of a number BoxCox, BoxCoxInv Box Cox transformation and inverse transformation LogGen, LogLin Log linear hybrid, generalized log LogSt, LogStInv Calculate started logarithmic transformation and it's inverse Logit, LogitInv Generalized logit and inverse logit function Winsorize Data cleaning by winsorization Trim Trim data by omitting outlying observations Recode Recode a factor with altered levels Rename Change name(s) of a named object Sort Sort extension for matrices and data.frames Large, Small Returns the kth largest, resp. smallest values Rev Reverses the order of rows and columns of a matrix Untable Recreates original list based on a n-dimensional frequency table Dummy Generate dummy codes for a factor FisherZ, FisherZInv Fisher's z-transformation and its inverse Information and manipulation functions: GetAllSubsets Generates all possible subsets out of a list of elements GetPairs Generates all pairs out of one or two sets of elements WhichFlags Returns the names of dichotomous columns of a data.frame WhichFactors Returns the names of factors in a given data.frame WhichNumerics Returns the names of numerical columns of a data.frame IsWhole Is x a whole number? Label Get or set the label attribute of an object Mbind Bind matrices to 3-dimensional arrays VecRot Shift the elements of a vector in a circular mode to the right or to the left by n characters. LOCF Imputation of data following the "last observation carried forward" rule String functions: StrTrim Delete white spaces from a string StrTrunc Truncate string on a given length and add ellipses if it really was truncated StrAbbr Abbreviates a string StrCap Capitalize the first letter of a string StrDist Compute distances between strings StrRev Reverse a string StrCountW Count the words in a string StrChop Split a string by a fixed number of characters. StrVal Extract numeric values from a string StrPos Find position of first occurrence of a string in another one StrIsNumeric Check whether a string does only contain numeric data Conversion functions: AscToChar, CharToAsc Converts ASCII codes to characters and vice versa DecToBin, BinToDec Converts numbers from binmode to decimal and vice versa DecToHex, HexToDec Converts numbers from hexmode to decimal and vice versa DecToOct, OctToDec Converts numbers from octmode to decimal and vice versa DegToRad, RadToDeg Convert Degrees to Radians and vice versa CartToPol, PolToCart Transform Cartesian to Polar Coordinates and vice versa Colors: SetAlpha Add an alpha channel to a color. ChooseColorDlg Display the system's color dialog to choose a color PlotRCol Display R colors in a dialog ColorLegend Add a color legend to a plot ColToGray, ColToGrey Convert colors to gcrey/grayscale ColToHex, HexToCol Convert a color into hex string ColToHsv R color to HSV conversion ColToRgb, RgbToCol Color to RGB conversion and back FindColor Get color on a defined color range MixColor Get the mix of two colors TextContrastColor Choose textcolor depending on background color PalRedToBlack, PalTibco Defined color palettes Plots: Canvas Canvas for geometric plotting Mar Set margins more comfortably. lines.loess Add a loess smoother to an existing plot ErrBars Add horizontal or vertical error bars to an existing plot DrawArc, DrawRegPolygon Draw elliptic, circular arc(s) or regular polygon(s) DrawCircle, DrawEllipse Draw a circle, ellipse DrawBezier Draw a Bezier curve DrawAnnulus, DrawAnnulusSector Draw one or several annuli, resp. sector of an annulus DrawBand Draw confidence band BoxedText Add text surrounded by a box to a plot Rotate Rotate a geometric structure SpreadOut Spread out a vector of numbers so that there is a minimum interval between any two elements. This can be used to place textlabels in a plot so that they do not overlap. AreaIdent Helps identifying all the points in a specific area. identify.formula Formula interface for identify. PtInPoly Identify all the points within a polygon. PlotACF, PlotMonth Create a combined plot of a time series and its autocorrelation and partial autocorrelation PlotArea Create an area plot PlotBag Create a two-dimensional boxplot PlotBubble Draw a bubble plot PlotCandlestick Plot candlestick chart PlotCirc Create a circular plot PlotCorr Plot a correlation matrix PlotDesc Create a descriptive plot of a vector x dependent on its class PlotDotCI Plot a dotchart with confidence intervals PlotDotCIp Plot a dotchart with binomial confidence intervals PlotFaces Produce a plot of Chernoff faces PlotFdist Frequency distribution plot, combination of histogram, boxplot and ecdf.plot PlotMarDens Scatterplot with marginal densities PlotMultiDens Plot multiple density curves PlotPolar Plot values on a circular grid PlotFct Plot mathematical expression or a function PolarGrid Plot a grid in polar coordinates PlotPyramid Pyramid plot (back-back histogram) PlotTreemap Plot of a treemap. PlotVenn Plot a Venn diagram PlotViolin Plot violins instead of boxplots PlotQQ QQ-plot for an optional distribution PlotWeb Create a web plot Statistics: Freq Frequency table PercTable Two dimensional percentage table Mode Mode, the most frequent value Gmean, Gsd Geometric mean and geometric standard deviation Hmean Harmonic Mean HuberM, TukeyBiweight Huber M-estimator of location and Tukey's biweight robust mean MeanAD Mean absolute deviation MeanSE Standard error of mean Skew, Kurt Skewness and kurtosis YuleQ, YuleY Yule's Q and Yule's Y TschuprowT Tschuprow's T Phi, ContCoef, CramerV Phi, Pearson's Contingency Coefficient and Cramer's V CohenKappa, Kappam Cohen's Kappa and weighted Kappa and Kappa for more than 2 raters CronbachAlpha Cronbach's alpha ICC Intraclass correlations GoodmanKruskalTauA Goodman Kruskal's tau-a GoodmanKruskalGamma Goodman Kruskal's gamma KendallTauB Kendall's tau-b StuartTauC Stuart's tau-c SomersDelta Somers' delta Lambda Goodman Kruskal's lambda UncertCoef Uncertainty coefficient TheilU Theil's U1 and U2 coefficient Entropy, MutInf Shannon's entropy, mutual information OddsRatio, RelRisk Odds ratio and relative risk Lc Calculate and plot Lorenz curve Gini, Atkinson Gini- and Atkinson coefficient Herfindahl, Rosenbluth Herfindahl- and Rosenbluth coefficient BinomCI, MultinomCI Confidence intervals for binomial and multinomial proportions BinomDiffCI Calculate confidence interval for a risk difference MeanCI, MedianCI Confidence interval for the mean and median MeanDiffCI Confidence interval for the difference of two means VarCI Confidence interval for the variance CorCI Confidence interval for Pearson's correlation coefficient RobScale Robust data standardization RobRange Robust range Outlier Outliers following Tukey's boxplot definition LOF Local Outlier Factor Tests: SignTest Signtest ZTest Z--test for known population variance JonckheereTerpstraTest Jonckheere-Terpstra test PageTest Page test for ordered alternatives CochranQTest Cochran's Q-test SiegelTukeyTest Siegel-Tukey test for equality in variability LeveneTest Levene's test for homogeneity of variance MosesTest Moses Test of extreme reactions RunsTest Runs test for randomness BartelsRankTest Bartels rank test for randomness JarqueBeraTest Jarque--Bera Test AndersonDarlingTest Anderson-Darling test for normality CramerVonMisesTest Cramer-von Mises test for normality LillieTest Lilliefors (Kolmogorov-Smirnov) test for normality PearsonTest Pearson chi-square test for normality ShapiroFranciaTest Shapiro-Francia test for normality MHChisqTest Mantel-Haenszel Chisquare test StuartMaxwellTest Stuart-Maxwell marginal homogeneity test LehmacherTest Lehmacher marginal homogeneity test CochranArmitageTest Cochran-Armitage test for trend in binomial proportions BreslowDayTest, WoolfTest Test for homogeneity on 2x2xk tables over strata PostHocTest Post hoc tests by Scheffe, LSD, Tukey for a aov-object ScheffeTest Multiple comparisons Scheffe test HotellingsT2Test Hotelling's T2 test for the one and two sample case. Date functions: AddMonths Add a number of months to a given date IsDate Check whether x is a date object IsWeekend Check whether x falls on a weekend IsLeapYear Check whether x is a leap year Date Create a date from numeric representation of year, month, day Day, Month, Year Extract part of a date Hour, Min, Sec Extract part of time Week, Weekday Returns ISO week and weekday of a date Quarter Quarter of a date YearDay, YearMonth The day in the year of a date Now, Today Get current date or date-time HmsToSec, SecToHms Convert h:m:s times to seconds and vice versa Zodiac The zodiac sign of a date :-) Finance functions: OPR One period returns (simple and log returns) NPV Net present value IRR Internal rate of return GUI-Helpers: ChooseColorDlg Display color dialog to choose a color ImportDlg Get path of a data file to be opened SelectVarDlg Select elements of a set by click PasswordDlg Display a dialog containing an edit field, showing only ***. PlotPar Display the R plot parameters in a dialog Explore A breeze of interactive plotting Reporting: CatTable Print a table with the option to have controlled linebreaks FormatFix Format a figure with a fixed number of digits Desc Produce a rich description of an object DescWrd Produce the same description as above but send the results to a Word document and add an adequate graphic representation GetCurrWrd Get a handle to a running Word instance GetNewWrd Create a new Word Instance WrdCaption Insert a title in Word WrdPlot Insert the active plot to Word WrdR Insert an R command and its output in a Word document WrdSetFont Set the font in Word WrdTable Insert a table in Word WrdText Insert normal text to Word WrdInsertBookmark Insert a new bookmark in a Word document WrdGoto Place cursor to a specific bookmark, or another text position. WrdUpdateBookmark Update the text of a bookmark's range GetNewXL Create a new Excel instance XLGetRange Get the values of one or several cell range(s) in Excel XLGetWorkbook Get the values of all sheets of an Excel workbook XLView Use Excel as viewer for a data.frame GetNewPP Create a new PowerPoint instance PpPlot Insert active plot to PowerPoint Tools: LsFct, LsData, LsObj List the functions (or the data, all objects) of a package FctArgs Retrieve the arguments of a functions ParseFormula Parse a formula and return the splitted parts of if Keywords Get the keywords of a man page SysInfo Get some more information about system and environment DescToolsOptions Get the DescTools specific options }