?wireframe
librar(lattice)
library(lattice)
?wireframe
wireframe(volcano, shade = TRUE,#
          aspect = c(61/87, 0.4),#
          light.source = c(10,0,10))
library(rminer)
help(package=rminer)
ls()
class(x)
x
class(y)
y
x=1
y="hello"
y
x=c(1.1,2.3,-1,4,2e-2)
x
x=c(1,2,3,4,5)
x
x=1:10
x
x=10:1
x
x=rnorm(18,25,1)
x
x=round(rnorm(18,25,1))
x
x=round(rnorm(18,35,10))
x
x=c(18,x)
x
x=c(98,x)
x
summary(x)
lenght(x)
length(x)
x
x[3]
x[3]=30
x
z[]=1
z=vector(length=5); print(z)
x
z
z[]=1; print(z)
z
z[c(1,3,5)]=2
z
sum(z)
min(z)
max(z)
sort(z)
plot(z,type="b",lwd=2,col="blue")
plot(z,type="b",lwd=20,col="blue")
a=rep(3,10)
a
rep(10,1000)
rep(10,5,3)
?rep
rep(10,5,times=3)
rep(x=10,5,times=3)
rep(x=10,times=3)
rep(x=10,5,each=3)
rep(c(1,2,3),5,each=3)
rep(c(1,2,3),5)
c=seq(2,20,2)
seq(2,20,2)
seq(1,20,2)
seq(1,20,1)
seq(1,20,-1)
seq(20,1,-1)
seq(20,1,lenght=3)
seq(20,1,length=3)
x
x^2+1
m=matrix(ncol=3,nrow=2)
m
m[,]=0
m
m[1,]
m[1,]=1:3
m
m[2,]=4:6
m
m[,1]=c(-1,-1)
m
m[,3]=c(10,10)
m
class(m)
sum(m)
summary(m)
print(m)
plot(m)
m=matrix(ncol=10,nrow=4); m[,]=0!
m=matrix(ncol=10,nrow=4); m[,]=0
m
m[c(1,3),seq(1,10,2)]=1
m
seq(1,10,2)
m
m[1,]
m[3,]
m[c(1,3),]
m[,1]
m
m[,3]
m[,c(1,3)]
m[c(1,3),seq(1,10,2)]
m[c(1,3),seq(1,10,2)]=3
m
seq(1,10,2)
?seq
y=factor(c("a","a","a","b","b","c"))
y
y+1
summary(y)
plot(y)
l=list(a="ola",b=1:3)
l
l=list(a="ola",b=1:3,f=y)
l
l$b
l$a
l$f
m=matrix(ncol=3,nrow=3); m[,]=1
m
d=data.frame(m); names(d)=c("dia","mes","ano")!
d=data.frame(m); names(d)=c("dia","mes","ano")
class(d)
class(m)
d
d[1,]
d[,1]
d$dia
d$mes=factor(c("Jan","Feb","Apr"))
d$ano=c(1999,1999,2000); print(d)
d
plot(d$mes)
plot(d$ano)
plot(d$ano,type="b")
d
summary(d)
d[2,1]=2
d
d[2,]=c(31,"Jan",2009)
d
edit(d)
names(d)
names(d)=c("Dia","Mes","Ano")
names(d)
d
d2=rbind(d,c(21,"Feb",2008))
d
d2
d
d2
d2=rbind(d2,d2)
d2
sample(1:10,3)
c(sample(1:50,5),sample(1:11,2))
for(i in 1:1000) c(sample(1:50,5),sample(1:11,2))
for(i in 1:1000) print(c(sample(1:50,5),sample(1:11,2)))
c(sort(sample(1:50,5)),sort(sample(1:11,2)))
cat("numeros:",c(sort(sample(1:50,5)),"estrelas:",sort(sample(1:11,2))))
set.seed(1)
cat("numeros:",c(sort(sample(1:50,5)),"estrelas:",sort(sample(1:11,2))))
set.seed(1)
cat("numeros:",c(sort(sample(1:50,5)),"estrelas:",sort(sample(1:11,2))))
x=rnorm(100,10)
y=rnorm(100,8)
x
y
t.test(x,y)
cor(x,y)
d2
d2[d2$Mes==Jan]
d2[,d2$Mes==Jan]
I=whic(d2$Mes==Jan)
I=which(d2$Mes==Jan)
I=which(d2$Mes=="Jan")
I
d2[I,]
library(foreign)
help(package=foreign)
q("no")
2509+2013+724
2507+2006+604
2507+2006+588
2507+1961+588
2507+1950+574
2507+1896+574
2507+1863+574
setwd("/Users/pcortez/R/rminer")
source("popular2.R")
RStudio_CRAN_data_folder <- download_RStudio_CRAN_data(START = '2013-04-02', END = '2013-04-05')
if(packageVersion("installr") %in% c("0.8","0.9","0.9.2")) install.packages('installr')
require(installr)
RStudio_CRAN_data_folder <- download_RStudio_CRAN_data(START = '2013-04-02', END = '2013-04-05')
my_RStudio_CRAN_data <- read_RStudio_CRAN_data(RStudio_CRAN_data_folder)
summary(my_RStudio_CRAN_data)
NROW(my_RStudio_CRAN_data)
which(my_RStudio_CRAN_data$package=="rminer")
cat("rminer installs:",length(which(my_RStudio_CRAN_data$package=="rminer")),"\n")
1+1+1+1+2+1
160-7
6+2+1+1+1+1+1
141-13
49-23
45-6
37-2
33-5
29-7
28-2
27-2
22-4
18-12
17-12
15-3
15-2
14-6
q("n")
q()
mean(3,4,3.5)
mean(3,4.5,3.5)
mean(c(3,4,3.5))
mean(c(3,4.5,4))
70+90+45
mean(c(3,4.5,4))
4.3/6
setwd("/Users/pcortez/DOUTORAMENTO/SergioMoro/DSS-article/UCI/bank-additional")
d=read.table("bank-additional.csv",header=TRUE,sep=";")
nrow(d)
ncol(d)
setwd("../bank")
d=read.table("bank-full.csv",header=TRUE,sep=";")
ncol(d)
nrow(d)
d=read.table("bank.csv",header=TRUE,sep=";")
nrow(d)
ncol(d)
table(d$y)
summary(d)
setwd("../bank-additional/")
d=read.table("bank-additional-full.csv",header=TRUE,sep=";")
summary(d)
table(d$emp.var.rate)
d=read.table("bank-additional-full.csv",header=TRUE,sep=";")
summary(d)
q("n")
q("no")
