R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

summary(cars)
##      speed           dist       
##  Min.   : 4.0   Min.   :  2.00  
##  1st Qu.:12.0   1st Qu.: 26.00  
##  Median :15.0   Median : 36.00  
##  Mean   :15.4   Mean   : 42.98  
##  3rd Qu.:19.0   3rd Qu.: 56.00  
##  Max.   :25.0   Max.   :120.00

Including Plots

You can also embed plots, for example:

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.

########################### BUSCA NO PUBMED #########################

# pacotes

library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.2     ✔ readr     2.1.4
## ✔ forcats   1.0.0     ✔ stringr   1.5.0
## ✔ ggplot2   3.4.2     ✔ tibble    3.2.1
## ✔ lubridate 1.9.2     ✔ tidyr     1.3.0
## ✔ purrr     1.0.1     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(RISmed)
## Warning: package 'RISmed' was built under R version 4.3.1
# palavra-chave de interesse

search_topic <- "weee"

search_query <- EUtilsSummary(search_topic, retmax = 1000)

summary(search_query)
## Query:
## "weee"[All Fields] 
## 
## Result count:  517
QueryId(search_query)
##   [1] "37442475" "37441409" "37300404" "37174242" "37154778" "37085683"
##   [7] "37078423" "37058236" "37043296" "37012563" "36995505" "36987169"
##  [13] "36934572" "36850984" "36844893" "36772010" "36769929" "36507095"
##  [19] "36502638" "36501458" "36413067" "36363253" "36226123" "36206656"
##  [25] "36146058" "36097308" "36089035" "36050312" "36011640" "36011636"
##  [31] "35939950" "35870363" "35789746" "35779620" "35691194" "35689973"
##  [37] "35657548" "35603922" "35512556" "35508235" "35475807" "35472614"
##  [43] "35462290" "35427901" "35420779" "35407686" "35395522" "35364180"
##  [49] "35282173" "35212576" "35202270" "35175436" "35160542" "35160474"
##  [55] "35155992" "35151134" "35141823" "35132386" "35104545" "35055588"
##  [61] "34973572" "34948553" "34947183" "34923185" "34908068" "34906834"
##  [67] "34896721" "34885483" "34871882" "34851486" "34773908" "34771760"
##  [73] "34735538" "34726090" "34683820" "34666086" "34619188" "34619185"
##  [79] "34616648" "34600293" "34597928" "34581643" "34502032" "34501885"
##  [85] "34500651" "34476712" "34410600" "34378139" "34371353" "34323747"
##  [91] "34312751" "34279300" "34252663" "34218064" "34215982" "34134409"
##  [97] "34121516" "34069410" "34056348" "33947020" "33946621" "33946200"
## [103] "33884548" "33838506" "33838389" "33773338" "33773154" "33765563"
## [109] "33761368" "33743338" "33743154" "33665699" "33618466" "33601178"
## [115] "33592321" "33588713" "33561771" "33477516" "33476959" "33406001"
## [121] "33308953" "33297517" "33281044" "33275192" "33254638" "33243638"
## [127] "33241733" "33171687" "33071476" "33059196" "33045436" "33040288"
## [133] "33023179" "33010546" "32923546" "32892092" "32829262" "32805603"
## [139] "32715338" "32693685" "32645852" "32638300" "32617815" "32608707"
## [145] "32557023" "32533494" "32531672" "32494109" "32474304" "32464780"
## [151] "32401631" "32388403" "32335485" "32330828" "32310119" "32305760"
## [157] "32250915" "32148304" "32091000" "32069729" "32062437" "32062281"
## [163] "32007879" "32004884" "31991344" "31918651" "31879115" "31864064"
## [169] "31864013" "31806284" "31796321" "31782095" "31756839" "31740297"
## [175] "31669676" "31646235" "31627320" "31627086" "31610473" "31563840"
## [181] "31541924" "31470497" "31470263" "31450178" "31429386" "31421486"
## [187] "31376966" "31351651" "31351637" "31351609" "31351598" "31280060"
## [193] "31279395" "31220758" "31203943" "31203937" "31170651" "31129902"
## [199] "31129466" "31109542" "31109518" "31096423" "31090011" "31079731"
## [205] "31079647" "31067685" "31030164" "31015086" "31001771" "30862075"
## [211] "30803592" "30793245" "30791650" "30774041" "30739853" "30736727"
## [217] "30691910" "30691900" "30642166" "30594016" "30509579" "30502531"
## [223] "30370832" "30366271" "30356001" "30343810" "30343809" "30268981"
## [229] "30268020" "30173027" "30165280" "30078953" "30014768" "30008413"
## [235] "29996450" "29925487" "29890593" "29783730" "29778831" "29778681"
## [241] "29710588" "29687747" "29626841" "29605307" "29602027" "29574370"
## [247] "29502494" "29496382" "29471166" "29470417" "29438937" "29353112"
## [253] "29289283" "29274687" "29269282" "29254608" "29244778" "29146398"
## [259] "29145100" "29058259" "29032002" "29030119" "28967530" "28951149"
## [265] "28946505" "28898811" "28828967" "28803340" "28784296" "28778001"
## [271] "28757222" "28751173" "28739025" "28685328" "28669496" "28636053"
## [277] "28587804" "28579144" "28521663" "28505070" "28483368" "28412098"
## [283] "28402832" "28392121" "28367757" "28353257" "28347586" "28343744"
## [289] "28318965" "28284143" "28215971" "28142111" "28126573" "28094158"
## [295] "28091997" "28089397" "28072866" "28038903" "28034614" "27912186"
## [301] "27898327" "27890594" "27836519" "27793304" "27575028" "27543174"
## [307] "26980485" "26970844" "26873014" "26860423" "26852754" "26783101"
## [313] "26704063" "26653360" "26626812" "26597372" "27769652" "27769650"
## [319] "27744159" "27723459" "27712943" "27687078" "27679968" "27678000"
## [325] "27673726" "27602948" "27596942" "27594574" "29989748" "27554437"
## [331] "27520390" "27478027" "27425863" "27425861" "27353372" "27329553"
## [337] "27281541" "27262786" "27206753" "27184448" "27181905" "27179704"
## [343] "27140655" "27086844" "27060658" "27033992" "26944864" "26820611"
## [349] "26728288" "26709550" "26449571" "26431677" "26413051" "26376121"
## [355] "26351732" "26347415" "26323203" "26264931" "26209344" "26139137"
## [361] "26087646" "26086878" "26070501" "26059074" "26055751" "26054962"
## [367] "26028407" "26022405" "25990983" "25947126" "25946954" "25913003"
## [373] "25869844" "25797074" "25782361" "25776743" "25746178" "25716742"
## [379] "25618642" "25599136" "25488733" "25464945" "25460941" "25453321"
## [385] "25406121" "25395159" "25281341" "25173859" "25062546" "24997795"
## [391] "24984918" "24910142" "24768515" "24726822" "24681442" "24633555"
## [397] "24632487" "24613592" "24491317" "24209362" "24068305" "24045170"
## [403] "24040839" "24035727" "24011783" "23973476" "23973472" "23933454"
## [409] "23921179" "23910246" "23899476" "23892135" "23890798" "23831004"
## [415] "23746984" "23651788" "23566340" "23561798" "23454465" "23360773"
## [421] "23337392" "23323842" "23305811" "24587980" "23246772" "22993131"
## [427] "22951495" "22921899" "22921510" "22884581" "22851536" "22851535"
## [433] "22840636" "22784477" "22552041" "22492263" "22463615" "22452958"
## [439] "22424707" "22410623" "22398030" "22370049" "22126427" "22115841"
## [445] "22107914" "22014584" "21963338" "21939231" "21939226" "21839627"
## [451] "21824987" "21824985" "21820883" "21771871" "21751577" "21742626"
## [457] "21536380" "21470841" "21399802" "21376556" "21342702" "21242175"
## [463] "21236569" "21147524" "21147523" "21146974" "20952178" "20951410"
## [469] "20843675" "20705678" "20696562" "20675114" "20570559" "20406755"
## [475] "20231083" "20117791" "20031385" "20022623" "20020324" "19857950"
## [481] "19850461" "19695860" "19581078" "19569352" "19470530" "19427188"
## [487] "19216066" "19201534" "19174199" "18829288" "18554788" "18513864"
## [493] "18511058" "18346846" "18262405" "18023973" "17993225" "17935966"
## [499] "17874657" "17612322" "17257150" "17253004" "17207844" "17198752"
## [505] "17008085" "16820262" "25868502" "16323764" "16169574" "15737719"
## [511] "15729818" "14700314" "14594087" "12870640" "12758010" "12630485"
## [517] "9713249"
records <- EUtilsGet(search_query) # pode levar um tempo...

# colunas para comporem a planilha

pubmed_data <- data.frame('Title' = ArticleTitle(records),
                          'Abstract' = AbstractText(records),
                          'ID' = ArticleId(records),
                          "Tipo" = PublicationType(records),
                          "Língua" = Language(records),
                          'Year' = YearArticleDate(records),
                          "Day" = DayArticleDate(records),
                          "Month" = MonthArticleDate(records),
                          "AnoPubmed" = YearPubmed(records),
                          "MesPubmed" = MonthPubmed(records),
                          "DiaPubmed" = DayPubmed(records))

pubmed_data$data_pubmed <- paste(pubmed_data$AnoPubmed, pubmed_data$MesPubmed, pubmed_data$DiaPubmed, sep = "-")

pubmed_data$data_artigo <- paste(pubmed_data$Year, pubmed_data$Month, pubmed_data$Day, sep = "-")

pubmed_data <- select(pubmed_data, select = -c("Day", "Month", "MesPubmed", "DiaPubmed"))

View(pubmed_data)

unique(pubmed_data$Tipo)
##  [1] "Journal Article"           "Editorial"                
##  [3] "Dataset"                   "Published Erratum"        
##  [5] "Case Reports"              "English Abstract"         
##  [7] "Comparative Study"         "Review"                   
##  [9] "Clinical Trial, Phase III" "Evaluation Study"
unique(pubmed_data$Língua)
## [1] "eng" "chi"
head(pubmed_data, n = 1)
##                                                                                                                                   Title
## 1 Are UK E-waste recycling facilities a source of environmental contamination and occupational exposure to brominated flame retardants?
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   Abstract
## 1 Investigations into the impacts of regulated electrical and electronic waste (e-waste) recycling activities on urban environments in Europe remain rather scarce. In this study, dust samples taken both inside and outside of five UK e-waste recycling facilities were analysed for concentrations of polybrominated diphenyl ethers (PBDEs), novel brominated flame retardants (NBFRs), and hexabromocyclododecane (HBCDD). Average concentrations of ∑BFRs in dust inside and outside UK e-waste recycling facilities were 12,000 ng/g and 180 ng/g, with median concentrations of 7500 ng/g and 85 ng/g, respectively. BDE-209 and decabromodiphenyl ethane (DBDPE) were the most abundant BFRs in both indoor and kerb dust, making a combined contribution to ∑BFRs of ~90 % on average. While four out of the five studied e-waste facilities showed a lack of significant impact on BFR contamination in surrounding environment, one of the studied e-waste recycling facilities was identified as a likely source of BFR contamination to UK urban environments, with industrial activities as another potential source of NBFRs. Occupational exposure of UK e-waste recycling workers to BFRs via dust ingestion was generally lower than that estimated for e-waste recyclers from other countries, but was comparable to BFR exposure via dust ingestion of UK office workers. Our estimates suggested that health burdens posed by dust ingestion of BFRs were minimal for UK e-waste recycling workers.
##         ID            Tipo Língua Year AnoPubmed data_pubmed data_artigo
## 1 37442475 Journal Article    eng 2023      2023   2023-7-14   2023-7-12
length(pubmed_data$ID)
## [1] 517
# write.csv(pubmed_data, 'weee.csv')