Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .Rhistory
Empty file.
17 changes: 17 additions & 0 deletions Algorithms/Algorithms/Random Number/random.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## 500 random numbers with normal distribution
rnorm(500)

#Random number with normal distribution using mean and standard deviation
rnorm(500,mean=10,sd=1);

# 500 random numbers between 0 and 100
runif(500, min=0, max=100);

#Random sample of 3 numbers in the range of 0 to 100 with replacement
sample(1:100, 3, replace=TRUE)

#visualize numbers distribution in a histogram
hist(rnorm(500));

#density
plot(density(runif(500, min=0, max=100)));