1 | cumrelf(x, xlab = "X", ylab = "CUM REL FREQ")
|
x |
|
xlab |
|
ylab |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (x, xlab = "X", ylab = "CUM REL FREQ")
{
xu = NULL
cf = NULL
if (is.matrix(x) || is.data.frame(x))
x = listm(x)
if (length(x) == 1)
stop("This function is designed for two or more groups")
x = elimna(x)
for (j in 1:length(x)) {
z = splot(x[[j]], plotit = FALSE)
xu = c(xu, sort(unique(x[[j]])))
cf = c(cf, cumsum(z$frequencies)/length(x[[j]]))
}
plot(xu, cf, , type = "n", xlab = xlab, ylab = ylab)
for (j in 1:length(x)) {
z = splot(x[[j]], plotit = FALSE)
print(z)
lines(sort(unique(x[[j]])), cumsum(z$frequencies)/length(x[[j]]),
lty = j)
}
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.