up to cum freq graph
This commit is contained in:
parent
6e61c43762
commit
ad72881793
Binary file not shown.
@ -129,3 +129,44 @@ waiting_period = faithful$waiting
|
||||
hist(waiting_period, right=FALSE, col=colors, main="Old Faithful Eruptions", xlab="Interval")
|
||||
hist(waiting_period, right=FALSE, col=colors, main="Old Faithful Eruptions", xlab="Interval in minutes")
|
||||
q()
|
||||
duration = faithful$eruptions
|
||||
breaks = seq(1.5, 5.5, by=0.5)
|
||||
duration.cut = cut(duration, breaks, right=FALSE)
|
||||
duration.freq = table(duration.cut)
|
||||
duration.relfreq = duration.freq / nrow(faithful)
|
||||
duration.relfreq
|
||||
pie(duration.relfreq)
|
||||
hist(duration.relfreq)
|
||||
hist(duration.relfreq)
|
||||
duration.freq
|
||||
duration = faithful$eruptions
|
||||
breaks = seq(1.5, 5.5, by=0.5)
|
||||
breaks
|
||||
typeof(breaks)
|
||||
duration.cut = cut(duration, breaks, right=FALSE)
|
||||
duration.freq = table(duration.cut)
|
||||
duration.cumfreq = cumsum(duration.freq)
|
||||
duration.cumfreq
|
||||
hist(cbind(duration.cumfreq))
|
||||
interval = faithful$waiting
|
||||
help(function)
|
||||
help("function")
|
||||
help("function")
|
||||
calc_cumfreq <- function(records)
|
||||
breaks = seq(1.5, 5.5, by=0.5)
|
||||
records.cut = cut(duration, breaks, right=FALSE)
|
||||
records.freq = table(duration.cut)
|
||||
records.cumfreq = cumsum(records.freq)
|
||||
return(records)
|
||||
calc_cumfreq <- function(records)
|
||||
breaks = seq(1.5, 5.5, by=0.5)
|
||||
records.cut = cut(records, breaks, right=FALSE)
|
||||
help("function")
|
||||
duration.cumfreq
|
||||
interval = faithful$eruptions
|
||||
breaks
|
||||
breaks.cut = cut(interval, breaks, right=FALSE)
|
||||
interval.freq = table(interval.cut)
|
||||
interval.cumfreq = cumsum(interval.freq)
|
||||
hist(interval.cumfreq)
|
||||
q()
|
||||
|
Loading…
Reference in New Issue
Block a user