Hiii

PHOTO EMBED

Tue Apr 02 2024 01:40:51 GMT+0000 (Coordinated Universal Time)

Saved by @V07

Square_number<-function(a)
{
for(k in1:a)
{
n<-k^2
print(n)
}
}
Square_number(5)
#Create a function without
argument
fun<-function()
{
print(“Printing Numbers from 1 to 8”)
for(i in 1:8)
{
print(i)
}
}
fun()




data(mtcars)

s<-mtcars$cyl

pm<-3

a<-0.08

sm<-mean(s)

sts<-sd(s)

se<-std/sqrt(length(s))

z<-(sm-pm)/se

p<-2*pnorm(-abs(z))

print(z)

print(p)

if(p<a){

 print("Reject the null hypothesis")

}else{

 print("Failed to reject the null hypothesis")

}
content_copyCOPY