Running examples in 'userfriendlyscience-Ex.R' failed
The error most likely occurred in:

> ### Name: userfriendlyscience-package
> ### Title: Userfriendlyscience (UFS)
> ### Aliases: userfriendlyscience-package userfriendlyscience ufs UFS
> ### Keywords: package
> 
> ### ** Examples
> 
> ### Create simple dataset
> dat <- PlantGrowth[1:20,];
> ### Remove third level from group factor
> dat$group <- factor(dat$group);
> 
> ### Examine normality
> normalityAssessment(dat$weight);
## SAMPLE DISTRIBUTION ###
Sample distribution of 20 observations
Mean=4.85, median=4.75, SD=0.7, and therefore SE of the mean = 0.16

Skewness (G1): 0.23  (se = 0.51, confidence interval = [-0.77,  1.23], z = 0.45, p = .65)
Kurtosis (G2): -0.57  (se = 0.99, confidence interval = [-2.5,  1.4], z = -0.57, p = .57)
Hartigans' Dip Test: 0.06, p = .73

Shapiro-Wilk: p=0.82 (W=0.97; based on 20 observations)
Anderson-Darling: p=0.87 (A=0.2)
Kolmogorov-Smirnof: p=0 (D=1)

## SAMPLING DISTRIBUTION FOR THE MEAN ###
Sampling distribution of 10000 samples of n=20
Mean=4.85, median=4.84, SD=0.15

Skewness (G1): 0.05  (se = 0.51, confidence interval = [-0.95,  1.06], z = 0.1, p = .92)
Kurtosis (G2): 0.05  (se = 0.99, confidence interval = [-1.9,  2.0], z = 0.048, p = .96)
Hartigans' Dip Test: 0, p = .99

Shapiro-Wilk: p=0.38 (W=1; NOTE: based on the first 5000 of 10000 observations)
Anderson-Darling: p=0.26 (A=0.46)
Kolmogorov-Smirnof: p=0 (D=1)> 
> ### Compute mean difference and show it
> meanDiff(dat$weight ~ dat$group, plot=TRUE);
Input variables:

  group (grouping variable)
  weight (dependent variable)
  Mean 1 (ctrl) = 5.03, sd = 0.58, n = 10
  Mean 2 (trt1)= 4.66, sd = 0.79, n = 10

Independent samples t-test (tested for equal variances, p = .372, so equal variances)
  (pooled standard deviation used, 0.7)

95% confidence intervals:
  Absolute mean difference: [-0.28, 1.03] (Absolute mean difference: 0.37)
  Cohen's d for difference: [-0.36, 1.42] (Cohen's d point estimate: 0.53)
  Hedges g for difference:  [-0.34, 1.36] (Hedges g point estimate:  0.51)

Achieved power for d=0.53: 0.2038 (for small: 0.0708; medium: 0.1851; large: 0.3951)

(secondary information (NHST): t[18] = 1.19, p = .249)
> 
> ### Show the t-test
> didacticPlot(meanDiff(dat$weight ~ dat$group)$t,
+              statistic='t',
+              df1=meanDiff(dat$weight ~ dat$group)$df);
Warning: `panel.margin` is deprecated. Please use `panel.spacing` property instead
Warning: Ignoring unknown aesthetics: x.lo, x.hi
Warning: Ignoring unknown aesthetics: x.lo, x.hi
> 
> ### Load data from simulated dataset testRetestSimData (which
> ### satisfies essential tau-equivalence).
> data(testRetestSimData);
> 
> ### Select some items in the first measurement
> exampleData <- testRetestSimData[2:6];
> 
> ## Not run: 
> ##D ### Show reliabilities
> ##D scaleStructure(dat=exampleData, ci=FALSE,
> ##D                omega.psych=FALSE, poly=FALSE);
> ## End(Not run)
> 
> ### Create a dichotomous variable
> exampleData$group <- cut(exampleData$t0_item2, 2);
> 
> ### Show item distributions and means
> meansDiamondPlot(exampleData);
Warning in mean.default(vector) :
  argument is not numeric or logical: returning NA
Error in var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm) : 
  Calling var(x) on a factor x is defunct.
  Use something like 'all(duplicated(x)[-1L])' to test for a constant vector.
Calls: meansDiamondPlot ... sapply -> lapply -> FUN -> meanConfInt -> sd -> var
Execution halted