R language Coding # starting... x=1 y=4 plot(x,y,col="red",pch=19,main="gaurav point",xlab="hello") plot(dbinom,0,3,col="red",pch=19,main="gaurav point",xlab="hello") mean(x,y) mean(x) mean(y) clear rm() ss=sample(c(1,2,3,4,5,6),size=100,replace=TRUE) factorial(5) choose(4,6) table(ss/length(ss)) table() #to see the current directory getwd() #to set the directory as current working directory setwd("C:/Users/gaura/OneDrive/Desktop/r language/data") #read data form csv file mydata = read.csv("C:/Users/gaura/OneDrive/Desktop/r language/data/marks.csv") #print data print(mydata) somedata=mydata[1:3] print(somedata) #creating and writing data in a file write.csv(somedata,"somedata.csv") read.csv("C:/Users/gaura/OneDrive/Desktop/r language/data/somedata.csv") x=rdunif(100,1,20) # Defining Function rdu<-function(n,k){sample(1:k,n,replace=T)} pdu<-function(x,k){ifelse(x<1,0,...
Comments