Email : garryjuliusperman@gmail.com
rpubs : https://rpubs.com/Garr
Jurusan : Statistika Bisnis
Address : ARA Center, Matana University Tower
Jl. CBD Barat Kav, RT.1, Curug Sangereng, Kelapa Dua, Tangerang, Banten 15810.
masukan=c(1:5)
integral <- function(x)
{
x^2 + x-2
}
integral(masukan)## [1] 0 4 10 18 28
cat("fungsi:",integral(masukan))## fungsi: 0 4 10 18 28
library(mosaicCalc)## Loading required package: mosaicCore
## Registered S3 method overwritten by 'mosaic':
## method from
## fortify.SpatialPolygonsDataFrame ggplot2
##
## Attaching package: 'mosaicCalc'
## The following object is masked from 'package:stats':
##
## D
integral = antiD((x + 2)^2 ~x)
integral## function (x, C = 0)
## 1/3 * (x + 2)^3 + C
lingkaran <- function(phi,r)
{
luas_permukaan = 4*phi*r^2
keliling = 2*phi*r
volume = phi*r^2
return (cat(c("luas permukaan:",luas_permukaan, sep = "/n","keliling:",keliling, sep = "/n", "volume:",volume)))
}
lingkaran(22/7,14)## luas permukaan: 2464 /n keliling: 88 /n volume: 616
nilai <- c(3,2,4,4,1,2.7,2.5,3.25,4,3.6)
frekuensi <- c(2,5,8,15,3,9,13,7,9,3)
data = data.frame(nilai,frekuensi)
data## nilai frekuensi
## 1 3.00 2
## 2 2.00 5
## 3 4.00 8
## 4 4.00 15
## 5 1.00 3
## 6 2.70 9
## 7 2.50 13
## 8 3.25 7
## 9 4.00 9
## 10 3.60 3
data = c(rep(3,2),rep(2,5),rep(4,8),rep(4,15),rep(1,3),rep(2.7,9),rep(2.5,13),rep(3.25,7),rep(4,9),rep(3.6,3))
max<-max(data)
min<-min(data)
mean<-mean(data)
median<-median(data)
mode<-mode(data)
variansi<-var(data)
standar_deviasi<-sd(data)
kesimpulan<-c(max,min,mean,median,mode,variansi,standar_deviasi)
names(kesimpulan)<-c(max,min,mean,median,mode,variansi,standar_deviasi)
kesimpulan## 4 1 3.20743243243243 3.25
## "4" "1" "3.20743243243243" "3.25"
## numeric 0.704019344687153 0.83905860622912
## "numeric" "0.704019344687153" "0.83905860622912"