knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(MATH4753davi0682)
This package is about the applications to data using R.
To read in csv files into R work space, we can use read.csv()
.
data
We can create a vector by using the c()
function.
v <- c(1,4,5) v
To create a list, we can use the function list
.
l <- list(a = 1:20, b = letters, c = rnorm(10)) l
mat <- matrix(NA, nrow= 10, ncol = 5, byrow = TRUE ) mat
To create a data frame, we can use data.frame()
df <- data.frame(a=1:26, b = letters, c = LETTERS, d= rnorm(26)) head(df)
This package includes 9 functions from the labs.
This function outputs scatter histogram of two vectors.
with(ddt, scatterhist(LENGTH,WEIGHT, xlab="LENGTH"))
This function outputs a bar plot showing the relative frequency of the numbers (10) from n times of random drawing.
mysample(n=1000,iter=1,time=1)
This functions output the plot of normal distribution, and the probability P=(Y <= x).
myncurve(mu=10,sigma=5,x=6)
This function outputs a bar plot of the relative frequency of the times of the success in a binomial test.
mybin(10000,10,.7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.