Sei sulla pagina 1di 22

Final Year Project Appendix Connor Chaplain

Database Appendix (disdatabase.xlsx)

1
Final Year Project Appendix Connor Chaplain

2
Final Year Project Appendix Connor Chaplain

3
Final Year Project Appendix Connor Chaplain

4
Final Year Project Appendix Connor Chaplain

5
Final Year Project Appendix Connor Chaplain

6
Final Year Project Appendix Connor Chaplain

7
Final Year Project Appendix Connor Chaplain

8
Final Year Project Appendix Connor Chaplain

Project Code Appendix


> library(readxl)
> disdatabase <- read_excel(“C:/Users/Connor/Desktop/Computing
Disseration/disdatabase.xlsx”)
> db0717<-subset (disdatabase, release_date> “2007-01-01” &
release_date < “2017-08-01”)
> db9006<-subset (disdatabase, release_date> “1993-01-01” &
release_date < “2006-01-01”)
> attach (disdatabase)
> plot (weeks_on_chart, peak_rank,
+ pch = 16,
+ cex = 0.8,
+ col = “red”,
+ main = “Weeks on Chart/Peak Rank”,
+ xlab = “Weeks on Chart”,
+ ylab = “Peak Rank”)
> abline(38, -0.9999,
+ col = “blue”,

9
Final Year Project Appendix Connor Chaplain

+ lwd = 2)
> attach (db0717)
> hist(peak_rank,
+ breaks = 40,
+ col = “blue”,
+ xlab = “Peak Rank”, main =”Frequency of Peak Ranks 2007-
2017”)
> attach (db0906)
> hist(peak_rank,
+ breaks = 40,
+ col = “blue”,
+ xlab = “Peak Rank”, main =”Frequency of Peak Ranks 1990-
2006”)
>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,
+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{
+ xlabel <- if (!missing(x))
+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =
“Danceability”, main = “Danceability 2007-2017” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db0717, scatter.smooth(release_date, danceability,
col=”blue”, lcol=”green”))
>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,
+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{

10
Final Year Project Appendix Connor Chaplain

+ xlabel <- if (!missing(x))


+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =
“Danceability”, main = “Danceability 1993-2006” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db9006, scatter.smooth(release_date, danceability,
col=”blue”, lcol=”green”))
>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,
+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{
+ xlabel <- if (!missing(x))
+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =
“Energy”, main = “Energy 2007-2017” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db0717, scatter.smooth(release_date, energy, col=”blue”,
lcol=”green”))

11
Final Year Project Appendix Connor Chaplain

>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,


+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{
+ xlabel <- if (!missing(x))
+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =
“Energy”, main = “Energy 1993-2006” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db9006, scatter.smooth(release_date, energy, col=”blue”,
lcol=”green”))
> attach (db0717)
> plot (key, release_date,
+ col = “blue”,
+ las = 1,
+ xlab = “Key”,
+ ylab = “Release Date”,
+ main = “Key 2007-2017”)
> attach (db9006)
> plot (key, release_date,
+ col = “blue”,
+ las = 1,
+ xlab = “Key”,
+ ylab = “Release Date”,
+ main = “Key 1993-2006”)
>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,
+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{

12
Final Year Project Appendix Connor Chaplain

+ xlabel <- if (!missing(x))


+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =
“Loudness”, main = “Loudness 2007-2017” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db0717, scatter.smooth(release_date, loudness, col=”blue”,
lcol=”green”))
>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,
+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{
+ xlabel <- if (!missing(x))
+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =
“Loudness”, main = “Loudness 1993-2006” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db9006, scatter.smooth(release_date, loudness, col=”blue”,
lcol=”green”))

13
Final Year Project Appendix Connor Chaplain

> attach (db0717)


> plot(mode, release_date),
+ col = “blue”,
+ las = 1,
+ xlab = “Mode”,
+ ylab = “Release Date”,
+ main = “Mode 2007-2017”)
> hist(db0717$mode,
+ breaks = 2,
+ col = “blue”,
+ xlab = “Mode”,
+ main = “Histogram of Mode 2007-2017”,
+ las = 1)
>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,
+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{
+ xlabel <- if (!missing(x))
+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =
“Speechiness”, main = “Speechiness 2007-2017” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db0717, scatter.smooth(release_date, speechiness, col=”blue”,
lcol=”green”))
>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,
+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{
+ xlabel <- if (!missing(x))

14
Final Year Project Appendix Connor Chaplain

+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =
“Speechiness”, main = “Speechiness 1993-2006” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db9006, scatter.smooth(release_date, speechiness, col=”blue”,
lcol=”green”))
>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,
+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{
+ xlabel <- if (!missing(x))
+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =
“Acousticness”, main = “Acousticness 2007-2017” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db0717, scatter.smooth(release_date, acousticness,
col=”blue”, lcol=”green”))

15
Final Year Project Appendix Connor Chaplain

>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,


+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{
+ xlabel <- if (!missing(x))
+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =
“Acousticness”, main = “Acousticness 1993-2006” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db9006, scatter.smooth(release_date, acousticness,
col=”blue”, lcol=”green”))
>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,
+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{
+ xlabel <- if (!missing(x))
+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)

16
Final Year Project Appendix Connor Chaplain

+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =


“Instrumentalness”, main = “Instrumentalness 2007-2017” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db0717, scatter.smooth(release_date, instrumentalness,
col=”blue”, lcol=”green”))
>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,
+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{
+ xlabel <- if (!missing(x))
+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =
“Instrumentalness”, main = “Instrumentalness 1993-2006” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db9006, scatter.smooth(release_date, instrumentalness,
col=”blue”, lcol=”green”))
>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,
+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{
+ xlabel <- if (!missing(x))
+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))

17
Final Year Project Appendix Connor Chaplain

+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =
“Liveness”, main = “Liveness 2007-2017” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db0717, scatter.smooth(release_date, liveness, col=”blue”,
lcol=”green”))
>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,
+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{
+ xlabel <- if (!missing(x))
+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =

“Liveness”, main = “Liveness 1993-2006” ....)

+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db9006, scatter.smooth(release_date, liveness, col=”blue”,
lcol=”green”))
>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,
+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)

18
Final Year Project Appendix Connor Chaplain

+{
+ xlabel <- if (!missing(x))
+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =
“Valence”, main = “Valence 2007-2017” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db0717, scatter.smooth(release_date, Valence, col=”blue”,
lcol=”green”))
>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,
+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{
+ xlabel <- if (!missing(x))
+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =
“Valence”, main = “Valence 1993-2006” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }

19
Final Year Project Appendix Connor Chaplain

> with(db9006, scatter.smooth(release_date, Valence, col=”blue”,


lcol=”green”))
>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,
+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{
+ xlabel <- if (!missing(x))
+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =
“BPM”, main = “BPM (Beats per Minute) 2007-2017” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db0717, scatter.smooth(release_date, tempo, col=”blue”,
lcol=”green”))
>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,
+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{
+ xlabel <- if (!missing(x))
+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab

20
Final Year Project Appendix Connor Chaplain

+ prediction <- loess.smooth(x, y, span, degree, family,


evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =
“BPM”, main = “BPM (Beats per Minute) 1993-2006” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db9006, scatter.smooth(release_date, tempo, col=”blue”,
lcol=”green”))
>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,
+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{
+ xlabel <- if (!missing(x))
+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x
+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =
“Duration (ms)”, main = “Duration 2007-2017” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db0717, scatter.smooth(release_date, duration_ms, col=”blue”,
lcol=”green”))
>scatter.smooth <- (x, y = NULL, span = 2/3, degree = 1,
+ family = c(“symmetric”, “Gaussian”, xlab = NULL,
ylab = NULL,
+ ylim = range(y, prediction$y, na.rm = TRUE),
evaluation = 50, lcol=”red”, ...)
+{
+ xlabel <- if (!missing(x))
+ deparse(substitute(x))
+ ylabel <- if (!missing(y))
+ deparse(substitute(y))
+ xy <- xy.coords(x, y, xlabel, ylabel)
+ x <- xy$x

21
Final Year Project Appendix Connor Chaplain

+ y <- xy$y
+ xlab <- if (is.null(xlab))
+ xy$xlab
+ else xlab
+ ylab <- if (is.null(ylab))
+ xy$ylab
+ else ylab
+ prediction <- loess.smooth(x, y, span, degree, family,
evaluation)
+ plot(x, y, ylim = ylim, xlab = “Release Date”, ylab =
“Duration (ms)”, main = “Duration 1993-2006” ....)
+ lines(predication, col=lcol) #
+ invisible()
+ }
> with(db9006, scatter.smooth(release_date, duration_ms, col=”blue”,
lcol=”green”))

22

Potrebbero piacerti anche