Documente Academic
Documente Profesional
Documente Cultură
Introdução ao Software
• Verificação:
na janela Console introduzir o comando getwd() para
verificar o Working Directory
Vetores
Sequências
> 1:10
[1] 1 2 3 4 5 6 7 8 9 10
> xx = 10:1 # sequência decrescente de 10 a 1
> xx
[1] 10 9 8 7 6 5 4 3 2 1
> seq(1,10,1) # o mesmo que 1:10
> seq(1,10,2) # de 2 em 2
> seq(10,1,-3) # ordem inversa ( passo negativo)
>x =1:10
>y = x^2
>plot(x,y)
> x = c (3,7,6,4,4,11,14,4,9,2)
> x
[1] 3 7 6 4 4 11 14 4 9 2
> y = mean(x)
> y
[1] 6.4
> z = var(x)
>z
[1] 14.93333
x = c (3,7,6,4,4,11,14,4,9,2)
x
mean(x)
var(x)