Skip to content
/ cowvin Public

Implementa list comprehension utilizando for loop.

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

cowvin0/cowvin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cowvin

O pacote cowvin implementa list comprehension em R utilizando for loop.

Instalação do cowvin

Como instalar o pacote cowvin:

library(remotes)
remotes::install_github("gabrielpereira12345/cowvin")

Exemplo

Utilizando list_comprehension para tomar o quadrado de números pares:

library(cowvin)

list_comprehension(for(i in 1:10) if(i %% 2  == 0) i*i)
#> [[1]]
#> [1] 4
#> 
#> [[2]]
#> [1] 16
#> 
#> [[3]]
#> [1] 36
#> 
#> [[4]]
#> [1] 64
#> 
#> [[5]]
#> [1] 100

Split em strings

list_comprehension(for(i in c("bata}ta", "cano}ura", "cara}melo")) strsplit(i, "}")[[1]][[1]])
#> [[1]]
#> [1] "bata"
#> 
#> [[2]]
#> [1] "cano"
#> 
#> [[3]]
#> [1] "cara"

About

Implementa list comprehension utilizando for loop.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages