rbind combines vector, matrix or data frame by rows. lets see an example of row bind in R
Z <-cbind(Veg$R, Veg$ROCK, Veg$LITTER)
colnames(Z) <- c("R", "ROCK", "LITTER")
Z
rbind combines vector, matrix or data frame by rows. lets see an example of row bind in R
df1 = data.frame(CustomerId = c(1:6), Product = c(rep("Oven", 3), , rep("Television", 3)))
df2 = data.frame(CustomerId = c(4:7), Product = c(rep("Television", 2), rep("Air conditioner", 2)))
> df1
CustomerId Product
1 1 Oven
2 2 Oven
3 3 Oven
4 4 Television
5 5 Television
6 6 Television
> df2
CustomerId Product
1 4 Television
2 5 Television
3 6 Air conditioner
4 7 Air conditioner
> df=rbind(df1,df2)
> df
CustomerId Product
1 1 Oven
2 2 Oven
3 3 Oven
4 4 Television
5 5 Television
6 6 Television
7 4 Television
8 5 Television
9 6 Air conditioner
10 7 Air conditioner
Voir le profil de Didier Leroy sur le portail Overblog
conda activate deeplearningaz pour activer l'environnement deplearningaz conda deactivate pour le desactiver
# generates the seeds for random selection n=10 job = unlist(lapply(runif(n,100,800),function(i){floor(i)}),use.names=FALSE)...