Nama : Fachrizal Fazza Ashari
Nim : 220605110077
Kelas : C
Mata kuliah : Kalkulus
Dosen pengampu : Prof. Dr. Suhartono, M. Kom
Jurusan : Teknik Informatika
Universitas : UIN Maulana Malik Ibrahim Malang
library(mosaicCalc)
## Loading required package: mosaic
## Registered S3 method overwritten by 'mosaic':
## method from
## fortify.SpatialPolygonsDataFrame ggplot2
##
## The 'mosaic' package masks several functions from core packages in order to add
## additional features. The original behavior of these functions should not be affected by this.
##
## Attaching package: 'mosaic'
## The following objects are masked from 'package:dplyr':
##
## count, do, tally
## The following object is masked from 'package:Matrix':
##
## mean
## The following object is masked from 'package:ggplot2':
##
## stat
## The following objects are masked from 'package:stats':
##
## binom.test, cor, cor.test, cov, fivenum, IQR, median, prop.test,
## quantile, sd, t.test, var
## The following objects are masked from 'package:base':
##
## max, mean, min, prod, range, sample, sum
## Loading required package: mosaicCore
##
## Attaching package: 'mosaicCore'
## The following objects are masked from 'package:dplyr':
##
## count, tally
##
## Attaching package: 'mosaicCalc'
## The following object is masked from 'package:stats':
##
## D
Loblolly
## height age Seed
## 1 4.51 3 301
## 15 10.89 5 301
## 29 28.72 10 301
## 43 41.74 15 301
## 57 52.70 20 301
## 71 60.92 25 301
## 2 4.55 3 303
## 16 10.92 5 303
## 30 29.07 10 303
## 44 42.83 15 303
## 58 53.88 20 303
## 72 63.39 25 303
## 3 4.79 3 305
## 17 11.37 5 305
## 31 30.21 10 305
## 45 44.40 15 305
## 59 55.82 20 305
## 73 64.10 25 305
## 4 3.91 3 307
## 18 9.48 5 307
## 32 25.66 10 307
## 46 39.07 15 307
## 60 50.78 20 307
## 74 59.07 25 307
## 5 4.81 3 309
## 19 11.20 5 309
## 33 28.66 10 309
## 47 41.66 15 309
## 61 53.31 20 309
## 75 63.05 25 309
## 6 3.88 3 311
## 20 9.40 5 311
## 34 25.99 10 311
## 48 39.55 15 311
## 62 51.46 20 311
## 76 59.64 25 311
## 7 4.32 3 315
## 21 10.43 5 315
## 35 27.16 10 315
## 49 40.85 15 315
## 63 51.33 20 315
## 77 60.07 25 315
## 8 4.57 3 319
## 22 10.57 5 319
## 36 27.90 10 319
## 50 41.13 15 319
## 64 52.43 20 319
## 78 60.69 25 319
## 9 3.77 3 321
## 23 9.03 5 321
## 37 25.45 10 321
## 51 38.98 15 321
## 65 49.76 20 321
## 79 60.28 25 321
## 10 4.33 3 323
## 24 10.79 5 323
## 38 28.97 10 323
## 52 42.44 15 323
## 66 53.17 20 323
## 80 61.62 25 323
## 11 4.38 3 325
## 25 10.48 5 325
## 39 27.93 10 325
## 53 40.20 15 325
## 67 50.06 20 325
## 81 58.49 25 325
## 12 4.12 3 327
## 26 9.92 5 327
## 40 26.54 10 327
## 54 37.82 15 327
## 68 48.43 20 327
## 82 56.81 25 327
## 13 3.93 3 329
## 27 9.34 5 329
## 41 26.08 10 329
## 55 37.79 15 329
## 69 48.31 20 329
## 83 56.43 25 329
## 14 3.46 3 331
## 28 9.05 5 331
## 42 25.85 10 331
## 56 39.15 15 331
## 70 49.12 20 331
## 84 59.49 25 331
gf_point(height ~ Seed, data=datasets::Loblolly)
library(dplyr)
library(mosaicCalc)
f1 <- spliner(height ~ age, data = datasets::Loblolly)
## Warning in regularize.values(x, y, ties, missing(ties)): collapsing to unique
## 'x' values
f1(age = 8)
## [1] 20.68193
f2 <- connector(height ~ age, data = datasets::Loblolly)
## Warning in regularize.values(x, y, ties, missing(ties), na.rm = na.rm):
## collapsing to unique 'x' values
f2(age = 8)
## [1] 20.54729
gf_point(height ~ age, data = datasets::Loblolly) %>%
slice_plot(f1(age) ~ age) %>%
slice_plot(f2(age) ~ age, color="yellow")
Cherry <- datasets::trees
gf_point(Volume ~ Girth, data = Cherry)
g1 = spliner(Volume ~ Girth, data = Cherry)
## Warning in regularize.values(x, y, ties, missing(ties)): collapsing to unique
## 'x' values
g2 = connector(Volume ~ Girth, data = Cherry)
## Warning in regularize.values(x, y, ties, missing(ties), na.rm = na.rm):
## collapsing to unique 'x' values
slice_plot(g1(x) ~ x, domain(x = 9:18)) %>%
slice_plot(g2(x) ~ x, color ="blue") %>%
gf_point(Volume ~ Girth, data = Cherry) %>%
gf_labs(x = "Girth (inches)")
g4 <- smoother(Volume ~ Girth, data=Cherry, span=4.0)
gf_point(Volume~Girth, data = Cherry) %>%
slice_plot(g4(Girth) ~ Girth) %>%
gf_labs(x = "Girth (inches)", y = "Wood volume")
library(mosaicCalc)
dataup1 = datasets :: Loblolly
dataup1
## height age Seed
## 1 4.51 3 301
## 15 10.89 5 301
## 29 28.72 10 301
## 43 41.74 15 301
## 57 52.70 20 301
## 71 60.92 25 301
## 2 4.55 3 303
## 16 10.92 5 303
## 30 29.07 10 303
## 44 42.83 15 303
## 58 53.88 20 303
## 72 63.39 25 303
## 3 4.79 3 305
## 17 11.37 5 305
## 31 30.21 10 305
## 45 44.40 15 305
## 59 55.82 20 305
## 73 64.10 25 305
## 4 3.91 3 307
## 18 9.48 5 307
## 32 25.66 10 307
## 46 39.07 15 307
## 60 50.78 20 307
## 74 59.07 25 307
## 5 4.81 3 309
## 19 11.20 5 309
## 33 28.66 10 309
## 47 41.66 15 309
## 61 53.31 20 309
## 75 63.05 25 309
## 6 3.88 3 311
## 20 9.40 5 311
## 34 25.99 10 311
## 48 39.55 15 311
## 62 51.46 20 311
## 76 59.64 25 311
## 7 4.32 3 315
## 21 10.43 5 315
## 35 27.16 10 315
## 49 40.85 15 315
## 63 51.33 20 315
## 77 60.07 25 315
## 8 4.57 3 319
## 22 10.57 5 319
## 36 27.90 10 319
## 50 41.13 15 319
## 64 52.43 20 319
## 78 60.69 25 319
## 9 3.77 3 321
## 23 9.03 5 321
## 37 25.45 10 321
## 51 38.98 15 321
## 65 49.76 20 321
## 79 60.28 25 321
## 10 4.33 3 323
## 24 10.79 5 323
## 38 28.97 10 323
## 52 42.44 15 323
## 66 53.17 20 323
## 80 61.62 25 323
## 11 4.38 3 325
## 25 10.48 5 325
## 39 27.93 10 325
## 53 40.20 15 325
## 67 50.06 20 325
## 81 58.49 25 325
## 12 4.12 3 327
## 26 9.92 5 327
## 40 26.54 10 327
## 54 37.82 15 327
## 68 48.43 20 327
## 82 56.81 25 327
## 13 3.93 3 329
## 27 9.34 5 329
## 41 26.08 10 329
## 55 37.79 15 329
## 69 48.31 20 329
## 83 56.43 25 329
## 14 3.46 3 331
## 28 9.05 5 331
## 42 25.85 10 331
## 56 39.15 15 331
## 70 49.12 20 331
## 84 59.49 25 331
library(mosaicCalc)
g <- makeFun(4 + exp(k*t) - 2^(b*t) ~ b, k=0.00035, t=1)
findZeros( g(b) ~ b , xlim=range(-1000, 1000) )
## b
## 1 2.322
library(mosaicCalc)
findZeros( sin(cos(x^2) - x) -x - 0.5 ~ x, xlim=range(-50,70))
## x
## 1 0.2098
library(mosaicCalc)
findZeros( sin(cos(x^2) - x) -x - 0.5 ~ x, xlim=range(-50,70))
## x
## 1 0.2098
g5 <- smoother(Volume ~ Girth+Height,
data = Cherry, span = 0.5)
gf_point(Height ~ Girth, data = Cherry) %>%
contour_plot(g5(Girth, Height) ~ Girth + Height) %>%
gf_labs(x = "Girth (inches)",
y = "Height (ft)",
title = "Volume (ft^3)")
g5 <- smoother(Volume ~ Girth+Height,
data = Cherry, span = 0.8)
gf_point(Height ~ Girth, data = Cherry) %>%
contour_plot(g5(Girth, Height) ~ Girth + Height) %>%
gf_labs(x = "Girth (inches)",
y = "Height (ft)",
title = "Volume (ft^3)")
g5 <- smoother(Volume ~ Girth+Height,
data = Cherry, span = 1.2)
gf_point(Height ~ Girth, data = Cherry) %>%
contour_plot(g5(Girth, Height) ~ Girth + Height) %>%
gf_labs(x = "Girth (inches)",
y = "Height (ft)",
title = "Volume (ft^3)")
Daftar Pustaka