Skip to main content
adicionou 12 caracteres ao conteúdo
Fonte Link
neves
  • 5,9mil
  • 13
  • 22
  • 56

Execute:

lista1<-list(c(1, 2, 3, 4, 5), c(6, 7, 8, 9, 10), c(11, 12, 13, 14, 15
), c(16, 17, 18, 19, 20), c(21, 22, 23, 24, 25))

res<novalista<-lapply(lista1,'*',8)
resnovalista

#[[1]]
#[1]  8 16 24 32 40

#[[2]]
#[1] 48 56 64 72 80

#[[3]]
#[1]  88  96 104 112 120

#[[4]]
#[1] 128 136 144 152 160

#[[5]]
#[1] 168 176 184 192 200

Execute:

lista1<-list(c(1, 2, 3, 4, 5), c(6, 7, 8, 9, 10), c(11, 12, 13, 14, 15
), c(16, 17, 18, 19, 20), c(21, 22, 23, 24, 25))

res<-lapply(lista1,'*',8)
res

#[[1]]
#[1]  8 16 24 32 40

#[[2]]
#[1] 48 56 64 72 80

#[[3]]
#[1]  88  96 104 112 120

#[[4]]
#[1] 128 136 144 152 160

#[[5]]
#[1] 168 176 184 192 200

Execute:

lista1<-list(c(1, 2, 3, 4, 5), c(6, 7, 8, 9, 10), c(11, 12, 13, 14, 15
), c(16, 17, 18, 19, 20), c(21, 22, 23, 24, 25))

novalista<-lapply(lista1,'*',8)
novalista

#[[1]]
#[1]  8 16 24 32 40

#[[2]]
#[1] 48 56 64 72 80

#[[3]]
#[1]  88  96 104 112 120

#[[4]]
#[1] 128 136 144 152 160

#[[5]]
#[1] 168 176 184 192 200
Fonte Link
neves
  • 5,9mil
  • 13
  • 22
  • 56

Execute:

lista1<-list(c(1, 2, 3, 4, 5), c(6, 7, 8, 9, 10), c(11, 12, 13, 14, 15
), c(16, 17, 18, 19, 20), c(21, 22, 23, 24, 25))

res<-lapply(lista1,'*',8)
res

#[[1]]
#[1]  8 16 24 32 40

#[[2]]
#[1] 48 56 64 72 80

#[[3]]
#[1]  88  96 104 112 120

#[[4]]
#[1] 128 136 144 152 160

#[[5]]
#[1] 168 176 184 192 200