Documentos de Académico
Documentos de Profesional
Documentos de Cultura
> datos<-c(2,3,0,3,1,0,0,1)
> datos
[1] 2 3 0 3 1 0 0 1
> z<-c(1,2,3,4,12,31,2,51,23,1,23,2341,23,512,32,312,123,21,3)
> z[3:7]
[1] 3 4 12 31 2
> z[3]<-7
> z[3:7]
[1] 7 4 12 31 2
> sort(z)
[1] 1 1 2 2 3 3 4 12 21 23 23 23 31 32 51 123 312 512 2341
> order(z)
[1] 1 10 2 7 3 19 4 5 18 9 11 13 6 15 8 17 16 14 12
# por ejemplo el nmero 1 estaba originalmente en la posicin 1 y en la
posicin 10
Crear matriz
> mat<-matrix(c(2,3,1,5),nrow=2,ncol=2)
> mat
[,1] [,2]
[1,] 2 1
[2,] 3 5
> onemat<-matrix(1,nrow=2,ncol=3)
> onemat
[,1] [,2] [,3]
[1,] 1 1 1
[2,] 1 1 1
> matrix(c(1,2,3,4,5,6,7),ncol=3)
[,1] [,2] [,3]
[1,] 1 4 7
[2,] 2 5 1
[3,] 3 6 2
x<-c(1,3,2,1)
y<-c(2,3,4,1)
xy<-data.frame(x,y)
xy
y
1 2
3 3
2 4
1 1
4 1 1 7
>
>
>
>
x
1
2
3
4
5
frijol<-read.table("C:/Users/Pedro/Desktop/DATA FRAME
DEBER/frijol_prod.txt",header=TRUE)
bact<-read.table("C:/Users/USER/Desktop/Agricola/bact.txt",header=TRUE)
bactVOEDING<-factor(bact$VOEDING)
library(car)
leveneTest(CONCEN~bactVOEDING,data=bact,center=mean)
aovbact<-aov(CONCEN~bactVOEDING,data=bact) ANOVA
summary(aovbact)
lillie.test(aovbact$res)
TurkeyHSD(aovbact)
plot(vector1,vector2)
hist(vector1)
str(cotton)
attach(cotton)
> tapply.stat(yield,cotton[,c(1,3)],mean)