Questions tagged [desctools]

An R package: Tools for Descriptive Statistics.

A collection of miscellaneous basic statistic functions and convenience wrappers for efficiently describing data. The author's intention was to create a toolbox, which facilitates the (notoriously time consuming) first descriptive tasks in data analysis, consisting of calculating descriptive statistics, drawing graphical summaries and reporting the results.

Links:

  1. CRAN: DescTools

  2. Pdf

  3. RDocumentation

61 questions
1
vote
1 answer

Shading forecasting Interval in time series in R using ggplot

Please refer to the dput of data . You may directly scroll down to objective and problem statement. Maybe you don't need data as you could have encountered this problem earlier. Calling required libraries…
learner
  • 828
  • 2
  • 19
  • 36
1
vote
1 answer

Determine presence and extent of overlapping date ranges by ID number - two data frames

I have two data frames as follows. They are of unequal length: library(lubridate) id <- c(1, 2, 2, 2, 2, 3, 4, 4, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 11, 11, 12, 13, 14, 15, 15, 5451396, 5451396,…
C_H
  • 191
  • 14
1
vote
1 answer

Integer overflow error using Gini function of package DescTools

I want to calculate Gini coefficients using Gini() from DescTools(because it offers an easy way to calculate "unbiased" Gini coefficients with weights, confidence intervals, etc.), but I get some errors when I use this function with "big" samples.…
1
vote
0 answers

Error 'Non-numeric argument to mathematical function' when run ScheffeTest with aov object

I ran the following code (taken from here): set.seed(123) Njk <- 10 P <- 2 Q <- 2 R <- 3 DV_t1 <- rnorm(P*Q*Njk, -3, 2) DV_t2 <- rnorm(P*Q*Njk, 1, 2) DV_t3 <- rnorm(P*Q*Njk, 2, 2) dfSPFpq.rL <- data.frame(id=factor(rep(1:(P*Q*Njk),…
mamatv
  • 3,581
  • 4
  • 19
  • 25
1
vote
1 answer

R – DescTools. Output format number in Desc function

I'm starting using DescTools package and have some trouble regarding the Desc() numeric output format. All the results are provided with scientific notation and I found it not so easy to read. With the summary standard function I've no this…
Tiziano
  • 271
  • 1
  • 5
  • 9
1
vote
3 answers

Fetch data from an open excel sheet into R?

I am wondering is it possible to read an excel file that is currently open, and capture things you manually test into R? I have an excel file opened (in Windows). In my excel, I have connected to a SSAS cube. And I do some manipulations using…
JeanVuda
  • 1,738
  • 14
  • 29
0
votes
2 answers

DescTools Displaying multiple graphs at once

I have tried displaying multiple graphs at once using the DescTools package But I can't find the plot objects!!! library("ggplot2") p1<-plot(Desc(dist ~ speed, data=cars), smooth="none") p2<-plot(Desc(dist ~ speed, data=cars),…
HerClau
  • 161
  • 2
  • 15
0
votes
0 answers

How to apply a multi-step DescTools function to multiple columns in a dataframe and then feed partial results into a new dataframe

I am fairly new to R (honestly, coding in general). I am having trouble figuring out the best way to apply the CCC (Lin's Concordance Correlation Coefficient) function from the DescTools package on my dataframe in Rstudio. I was able to get the…
0
votes
0 answers

Need help understanding the output of DescTools:::.DoCount

As the documentation of DescTools:::ConDisPairs() says, the function DescTools:::.DoCount() returns "only concorant and discordant pairs". However, there are 4 non-NA list elements that are returned by the function named C, D, T, and N. I understand…
swolf
  • 1,020
  • 7
  • 20
0
votes
1 answer

Why is Theil's U2 accuracy not the same in forecast package and DescTools?

Today I was trying to use Theil's U2 from DescTools instead of forecast package. I am just wondering, why are both functions returning different results? As far as I am informed, there should be no…
Leonhard Geisler
  • 506
  • 3
  • 15
0
votes
0 answers

How can I get library DescTools to work on R with ARM Mac M1

I am running R on Mac with ARM with the following config: R version 4.1.0 (2021-05-18) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS Big Sur 11.4 I get the following error when trying to load library DescTools: >…
gmarais
  • 1,801
  • 4
  • 16
  • 32
0
votes
0 answers

Use ConnLines on ggplot2 in R

I am trying to draw connection lines between several bars in a stacked barplot (ggplot2) in R. For this, I found the ConnLines function from the DescTools package. I aim for a similar result as shown in the documentation. taxa_bars <-…
Bianca
  • 1
  • 2
0
votes
2 answers

How to trim a vector in r?

I am trying to trim a vector in r by percentage. The function should discard the lowest 5% and the highest 5% values of X, and then return the mean, variance, and median of X. my_aggregation <- function(x,is.truncated=FALSE){ if…
Shlomi
  • 1
  • 2
0
votes
0 answers

R: ggdotplot issues: how to change colors

I have some questions regarding dotplots in R using ggdotplot. There are several issues but I would like to focus on just one for now: I would like to change the fill-color and shape of the "mean_sd" to yellow and a diamond to contrast with the…
Tyrone
  • 143
  • 1
  • 4
0
votes
1 answer

Using the desctools package to clculate PseudoR2 is returning an error

var1<-sample(c('A', 'B', 'C'), replace = T, size=100) var2<-sample(c(0,1), size=100, replace=T) var3<-rnorm(100, mean=10, sd=2) df<-data.frame(var1, var2, var3) library(nnet) m1<-multinom(var1~var2, data=df) m2<-multinom(var1~var3,…
spindoctor
  • 1,719
  • 1
  • 18
  • 42