You are on page 1of 1

getwd()

dir()
library(moments)
library(lattice)
library(ggplot2)
#generare de nr aleatoare
a<-seq(0,100,0.1) #generare de nr, defapt e un vector
a
View(a)
mean(a)
var(a)
sd(a)
plot(a)
hist(a)
#generare de nr aleatoare folosind distributie normala

b<-rnorm(200,mean=30,sd=3.5)
b
set.seed(29)
mean(b)
var(b)
sd(b)
skewness(b)
kurtosis(b)
plot(b,main="plot pt distr normala", col="red",pch=16)
hist(b, main="histograma",col="purple")

#Citire de date in R folosind fisiere text


d<-read.table(file="date.txt", header= TRUE, sep="\t")
attach(d)
fix(d)
View(d)

summary(d) #summary - pt afisarea statisticilor descriptive

plot(d$Google, main="grafic google", col="blue", type="l",


lty=2,xlab="zile",ylab="preturi")

You might also like