Greetings R community,
Here is a small but perplexing problem with the ‘yuen’ function in the
‘WRS2’ package.
I begin with the ‘eurosoccer’ data frame from the ‘WRS2’ package.
Then make a subset that contains only two Leagues Spain and Germany
(subset data frame is ‘SpainGer’).   The ‘yuen’ function cannot read
the data in subset data frame ‘SpainGer’.  My code is below.
Thanks you for your help.
James F. Henson


# Examples from 'Robust Statistical Methods on R Using the WRS2 Package’
# Robust t-test, and ANOVA (pages5-13)
library(WRS2)
data("eurosoccer")
class(eurosoccer)
print(eurosoccer)
library("digest")
library("DT")
datatable(eurosoccer)
str(eurosoccer)
# make a subset with only Spain and Germany
SpainGer <- subset (eurosoccer, subset = League =="Spain" | League == "Germany")
print(SpainGer)
class(SpainGer)
str(SpainGer)
# The 'yuen' function can not read the data in the subset data.frame "SpainGer"
yuen(GoalsGame ~ League, tr=0.2, data = SpainGer)
# the 'yuen' function works on the orginioal data.frame
yuen(GoalsGame ~ League, tr=0.2, data = eurosoccer)
# the 'aov' function reads the data in the subset data.frame "SpainGer"
Goals.fit <- aov(GoalsGame ~ League, data = SpainGer)
summary(Goals.fit)

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to