id=c(1,2,3,4,5)
sex=c("Male","Female","Female","Male","Female")
age=c(37,29,48,36,33)
educ=c("Graduate","Post_gr","Under_gr","Under_gr","Graduate")
status=c("Divorced","Single","Married","Married","Single")
income=c(5500,4100,5400,6500,5400)
grade=c(3.78,3.89,3.67,2.78,2.75)
bonus=c(11000,82000,10800,13000,10800)
company4=data.frame(id,sex,age,educ,status,income,grade,bonus)
company4
edit(company4)
load("C:/Rtemp/dataset_company4.RData")
company4
local({pkg <- select.list(sort(.packages(all.available = TRUE)),graphics=TRUE)
if(nchar(pkg)) library(pkg, character.only=TRUE)})
local({pkg <- select.list(sort(.packages(all.available = TRUE)),graphics=TRUE)
if(nchar(pkg)) library(pkg, character.only=TRUE)})
utils:::menuInstallPkgs()
utils:::menuInstallPkgs()
utils:::menuInstallPkgs()
utils:::menuInstallPkgs()
utils:::menuInstallPkgs()
utils:::menuInstallPkgs()
utils:::menuInstallPkgs()
local({pkg <- select.list(sort(.packages(all.available = TRUE)),graphics=TRUE)
if(nchar(pkg)) library(pkg, character.only=TRUE)})
q()
library(readxl)
data2 <- read_excel("C:/Rtemp/File_001.xlsx")
View(data2)
library(readxl)
data_file_001 <- read_excel("C:/Rtemp/File_001.xlsx")
View(data_file_001)
load("C:/Rtemp/dataset_company4.RData")
test1=c(76,60,85,58,91,75,82,64,79,88)
test2=c(81,52,87,70,86,77,90,63,85,83)
t.test(test2,test1,paired=TRUE,mu=5,alternative="two.sided")
test1=c(76,60,85,58,91,75,82,64,79,88)
test2=c(81,52,87,70,86,77,90,63,85,83)
t.test(test2,test1,paired=TRUE,mu=5,alternative="two.sided")
treatment=c(1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,5)
weight=c(551,457,450,731,499,632,595,580,508,583,633,517,639,615,511,573,648,677,417,449,517,438,415,555,563,631,522,613,656,679)
treatment=factor(treatment)
report=aov(weight~treatment)
summary(report)
x=c(1.5,1.8,2.4,3.0,3.5,3.9,4.4,4.8,5.0)
y=c(4.8,5.7,7.0,8.3,10.9,12.4,13.1,13.6,15.3)
n=length(x);n
sumx=sum(x);sumx
sumxx=sum(x*x);sumxx
sumy=sum(y);sumy
sumyy=sum(y*y);sumyy
sumxy=sum(x*y);sumxy
xbar=mean(x);xbar
ybar=mean(y);ybar
sxx=sumxx-sumx^2/n;sxx
syy=sumyy-sumy^2/n;syy
sxy=sumxy-sumx*sumy/n;sxy
b=sxy/sxx;b
a=ybar-b*xbar;a
r=sxy/sqrt(sxx*syy);r
load("C:/Rtemp/dataset_company4.RData")
company4
m1=c("a","a","a","a","a","a","a","a","a")
w1=c(61.36,57.76,71.94,61.77,58.66,71.61,71.52,58.67,62.77)
m2=c("b","b","b","b","b","b","b","b","b","b","b","b","b","b","b","b")
w2=c(56.92,58.30,67.48,53.96,62.00,59.61,52.02,61.60,64.83,58.55,52.53,64.74,55.51,66.18,55.51,54.18)
weight=c(w1,w2)
machine=c(m1,m2)
data_file=data.frame(machine,weight)
var.test(weight~machine,data=data_file,conf.level=0.95)
setwd("C:/NewRtemp")
