I am trying to use NanoStringDiff to identify differentially expressed microRNAs between treatment and control samples, but I am obtaining extraordinarily large values for the fold change (log2FC is 27 for certain genes, but expected to be around 1 by inspection). I think there is an error with my code. I am using the following guide http://www.bioconductor.org/packages/release/bioc/vignettes/NanoStringDiff/inst/doc/NanoStringDiff.pdf
I've included my code below and the data I am using is publicly available on https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE84971 (GSE84971_non-normalized.txt.gz)
I took this data and converted it into an Excel file in the format as specified in the guide which I called "data".
Any help is much appreciated.
source("https://bioconductor.org/biocLite.R")
biocLite()
biocLite("NanoStringDiff")
biocLite("Biobase")
library("BioBase")
library("NanoStringDiff")
designs=data.frame(group=c("Control","Control","Control", "Treatment", "Treatment", "Treatment"))
designs
directory <- "/Users/admin/Desktop"
path <- paste(directory, "data.csv", sep ="/", collapse = NULL)
NanoStringData=createNanoStringSetFromCsv(path,header=TRUE,designs)
pheno=pData(NanoStringData)
group=pheno$group
design.full=model.matrix(~0+group) #create a design (or model) matrix
design.full
contrast=c(-1,1)
NanoStringData=estNormalizationFactors(NanoStringData)
positiveFactor(NanoStringData)
negativeFactor(NanoStringData)
housekeepingFactor(NanoStringData)
result=glm.LRT(NanoStringData,design.full, Beta= ncol(design.full), contrast=contrast)
result$table
I attempted to add the data using dput(NanoString), hopefully this makes my code more self-contained. Below is shown the output.
new("NanoStringSet"
, positiveFactor = numeric(0)
, negativeFactor = numeric(0)
, housekeepingFactor = numeric(0)
, positiveControl = structure(c(51117L, 9153L, 2357L, 749L, 133L, 88L, 30283L, 6423L,
1178L, 444L, 83L, 35L, 46143L, 8040L, 2014L, 554L, 114L, 82L,
48365L, 9338L, 2158L, 603L, 135L, 91L, 52744L, 10177L, 2391L,
786L, 143L, 72L, 70189L, 12069L, 3186L, 693L, 176L, 110L), .Dim = c(6L,
6L), .Dimnames = list(c("POS_A(128)", "POS_B(32)", "POS_C(8)",
"POS_D(2)", "POS_E(0.5)", "POS_F(0.125)"), c("Control.1", "Control.2",
"Control.3", "Treatment.1", "Treatment.2", "Treatment.3")))
, negativeControl = structure(c(52L, 32L, 40L, 14L, 104L, 74L, 28L, 25L, 29L, 11L,
74L, 45L, 31L, 32L, 29L, 13L, 80L, 60L, 61L, 44L, 32L, 5L, 103L,
74L, 56L, 42L, 44L, 15L, 135L, 62L, 55L, 54L, 36L, 12L, 108L,
61L), .Dim = c(6L, 6L), .Dimnames = list(c("NEG_B(0)", "NEG_C(0)",
"NEG_A(0)", "NEG_F(0)", "NEG_E(0)", "NEG_D(0)"), c("Control.1",
"Control.2", "Control.3", "Treatment.1", "Treatment.2", "Treatment.3"
)))
, housekeepingControl = structure(c(825L, 1892L, 1293L, 1496L, 2157L, 1254L, 1081L, 1121L,
914L, 1223L, 2123L, 3912L, 1876L, 2217L, 3363L, 1392L, 1750L,
1626L, 1196L, 1917L, 1378L, 1446L, 1300L, 1077L, 1875L, 2098L,
8006L, 2989L, 4447L, 4930L), .Dim = 5:6, .Dimnames = list(c("Actb|0",
"B2m|0", "Gapdh|0", "Rpl19|0", "Rplp0|0"), c("Control.1", "Control.2",
"Control.3", "Treatment.1", "Treatment.2", "Treatment.3")))
, experimentData = new("MIAME"
, name = ""
, lab = ""
, contact = ""
, title = ""
, abstract = ""
, url = ""
, pubMedIds = ""
, samples = list()
, hybridizations = list()
, normControls = list()
, preprocessing = list()
, other = list()
, .__classVersion__ = new("Versions"
, .Data = list(c(1L, 0L, 0L), c(1L, 1L, 0L))
)
)
, assayData = <environment>
, phenoData = new("AnnotatedDataFrame"
, varMetadata = structure(list(labelDescription = NA_character_), .Names = "labelDescription", row.names = "group", class = "data.frame")
, data = structure(list(group = structure(c(1L, 1L, 1L, 2L, 2L, 2L), .Label = c("Control",
"Treatment"), class = "factor")), .Names = "group", row.names = c("Control.1",
"Control.2", "Control.3", "Treatment.1", "Treatment.2", "Treatment.3"
), class = "data.frame")
, dimLabels = c("sampleNames", "sampleColumns")
, .__classVersion__ = new("Versions"
, .Data = list(c(1L, 1L, 0L))
)
)
, featureData = new("AnnotatedDataFrame"
, varMetadata = structure(list(labelDescription = character(0)), .Names = "labelDescription", row.names = character(0), class = "data.frame")
, data = structure(list(), .Names = character(0), class = "data.frame", row.names = c("hsa-miR-10a-5p|0",
"hsa-miR-1234|0", "hsa-miR-185-5p|0", "hsa-miR-27a-3p", "hsa-miR-34c-3p",
"hsa-miR-1181|0", "hsa-miR-601", "hsa-miR-4454"))
, dimLabels = c("featureNames", "featureColumns")
, .__classVersion__ = new("Versions"
, .Data = list(c(1L, 1L, 0L))
)
)
, annotation = character(0)
, protocolData = new("AnnotatedDataFrame"
, varMetadata = structure(list(labelDescription = character(0)), .Names = "labelDescription", row.names = character(0), class = "data.frame")
, data = structure(list(), .Names = character(0), class = "data.frame", row.names = c("Control.1",
"Control.2", "Control.3", "Treatment.1", "Treatment.2", "Treatment.3"
))
, dimLabels = c("sampleNames", "sampleColumns")
, .__classVersion__ = new("Versions"
, .Data = list(c(1L, 1L, 0L))
)
)
, .__classVersion__ = new("Versions"
, .Data = list(c(3L, 3L, 1L), c(2L, 34L, 0L), c(1L, 3L, 0L), c(1L, 0L,
0L))
)
)
Thanks!
Related
I've been experimenting with the TikTok Scraper tool (https://github.com/drawrowfly/tiktok-scraper/) for a little while and, while I'm not a expert, I've been using R for some of the more simples analysis of the scraped data, but I've experiencing issues with the hashtags scraping.
Whenever I scrape data from, let's say, an specific hashtag, I receive data in a format that's not very suitable for my work, for instance:
***[{"id":"1662240138893317","name":"globolixoo","title":"","cover":""},{"id":"56170","name":"mentira","title":"","cover":""}]***
All that interests to me are the terms that come after "name": — that is, 'globolixoo' and 'mentira'.
Is there any way in which I can isolate these terms and separate them by comma (globolixoo,mentira)?
Reproducible code example:
dput(head(globolixoo, 10)
structure(list(id = c(6808536063938710528, 6814233256737786880,
6825734509393103872, 6945455970969488384, 6949635086916635648,
6970340938765978624, 6971908200639630336, 6973074032547613696,
6973112184809212928, 6973333129226505216), secretID = c(6808536063938710528,
6814233256737786880, 6825734509393103872, 6945455970969488384,
6949635086916635648, 6970340938765978624, 6971908200639630336,
6973074032547613696, 6973112184809212928, 6973333129226505216
), webVideoUrl = c("https://www.tiktok.com/#aguiarsillvabarbe/video/6808536063938710790",
"https://www.tiktok.com/#deysetavares77/video/6814233256737787141",
"https://www.tiktok.com/#davinunesrocha1988/video/6825734509393104134",
"https://www.tiktok.com/#fernandomedeiros84/video/6945455970969488646",
"https://www.tiktok.com/#marcoaaspm/video/6949635086916635909",
"https://www.tiktok.com/#diverticity/video/6970340938765978885",
"https://www.tiktok.com/#erick.castrooficial/video/6971908200639630597",
"https://www.tiktok.com/#dublagem19/video/6973074032547613958",
"https://www.tiktok.com/#dublagem19/video/6973112184809213189",
"https://www.tiktok.com/#dublagem19/video/6973333129226505478"
), text = c("#GloboLixoo", "#globolixoo", "#GLOBOLIXOO 🤮🤮",
"#GloboLixoo", "#globolixoo", "#globolixoo #mentira kkkkkkk",
"E assim foi a minha chegada aqui... valeu galera ❤️ #lulaxbolsonaro #globolixoo x #bolsonaro2022 #foryou #fory #fyyy #golpista #obrigadogalera",
"Responder a #luizguilhermeol2 #flamengooooo #paravocefo #dublagem19 #flamengosergipe #copaamerica #flamengo #flamengolibertadores #Eriksen #globolixoo",
"Responder a #vinicius.almeida829 #globolixoo #flamengolibertadores #flamengo #copaamerica #flamengosergipe #dublagem19 #neymar #globol",
"#neymar #Eriksen #globolixoo #flamengolibertadores #dublagem19 #flamengosergipe #copaamerica #foryoupage #paravoce #globolixooo #flamengo #fyyy"
), createTime = c(1585235836L, 1586562318L, 1589240162L, 1617114988L,
1618088013L, 1622908971L, 1623273877L, 1623545319L, 1623554204L,
1623605644L), date = c("26/03/2020", "10/04/2020", "11/05/2020",
"30/03/2021", "10/04/2021", "05/06/2021", "09/06/2021", "13/06/2021",
"13/06/2021", "13/06/2021"), authorMeta.id = c(6807209790076404736,
6808216797218505728, 6822488437678539776, 6573364480217792512,
6949596571051525120, 6801837537368605696, 6817099676148990976,
6890609472302023680, 6890609472302023680, 6890609472302023680
), authorMeta.secUid = c("MS4wLjABAAAAUCftiaqGW7kGk4tZlB2socpml7caR7G1BWDVPCMoZeYPYxujhgejBN79QwvG47Ux",
"MS4wLjABAAAANtz2eThsfv8a4hhYR3pX1u2IBHhIX6cQfd9yefX7BjTph4ZafKiw68EYJF3fuqj9",
"MS4wLjABAAAAasFrM5NNvAW8xmzQHoI26Boc1FDwureCXdg2kC5i7maZJRxrtehC_SGJmYRx0cvf",
"MS4wLjABAAAAlepLE-8A44KU_01sgDHePJ0W4XP3EjRYSuOAssGWuGKj_vP2lpyX-OucAhZTmHMF",
"MS4wLjABAAAANc_0vx6MTxJZYFTWUAgyKfG8yzgyW6ujL-pVYsKKpYom2YyhTeOWItG9bEN70fZW",
"MS4wLjABAAAAK10peXSI-KJUKrtQQ_SeWMO4QS7NbxII7BwzudZFY4aws4UdhpjgQ-_0N4bgtQAF",
"MS4wLjABAAAATIlZhohPSapj2p7BEUMG6JM4uQJ9S85Qeg2V_f-il28SnrBMezeIpz6SKuDZVqNN",
"MS4wLjABAAAADWuMEBp9pN_j63r3o8eKwOqxArviqnWQvs-ENGvU03_XPiF2h2ttQubAws_xr3De",
"MS4wLjABAAAADWuMEBp9pN_j63r3o8eKwOqxArviqnWQvs-ENGvU03_XPiF2h2ttQubAws_xr3De",
"MS4wLjABAAAADWuMEBp9pN_j63r3o8eKwOqxArviqnWQvs-ENGvU03_XPiF2h2ttQubAws_xr3De"
), authorMeta.name = c("aguiarsillvabarbe", "deysetavares77",
"davinunesrocha1988", "fernandomedeiros84", "marcoaaspm", "diverticity",
"erick.castrooficial", "dublagem19", "dublagem19", "dublagem19"
), authorMeta.nickName = c("Aguiar Sillva Barbei", "Kayque Jesus",
"Davi Nunes Rocha", "Fernando Medeiros", "user9898887549048",
"diverticity", "Erick Rosário", "Ramon Santos", "Ramon Santos",
"Ramon Santos"), authorMeta.verified = c(FALSE, FALSE, FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE), authorMeta.signature = c("",
"me seguem no tik Tok gentee meu Instagram é #deyse3760", "",
"", "Sou um cara legal que adora tomar umas cervejas e fazer um bom churrasco...",
"", "Jornalista | Pregador do Evangelho\n\nEX GLOBAL\nInsta:#erick_castrooficial",
"muito obrigado pelo 90k 🙏🙏🙏🔥", "muito obrigado pelo 90k 🙏🙏🙏🔥",
"muito obrigado pelo 90k 🙏🙏🙏🔥"), authorMeta.avatar = c("https://p16-sign-va.tiktokcdn.com/musically-maliva-obj/1662059894232070~c5_1080x1080.jpeg?x-expires=1645729200&x-signature=3jVCVxW73fDbv5a8uBjE1fMuJJ4%3D",
"https://p16-sign-va.tiktokcdn.com/musically-maliva-obj/1663890951712774~c5_1080x1080.jpeg?x-expires=1645729200&x-signature=K0TDOlOzj9bS799Mj8oOwSbWO4w%3D",
"https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/3537e047a2d150a5a92818b60384bef8~c5_1080x1080.jpeg?x-expires=1645729200&x-signature=OW8A5M8UcE%2FmxzDSrBf8prN1CdM%3D",
"https://p16-sign-sg.tiktokcdn.com/aweme/1080x1080/tos-alisg-avt-0068/d2023f10221a1d54c397daba7ccc0d6b.jpeg?x-expires=1645729200&x-signature=InxZURrUyON59BteEQh7bRb%2BwUk%3D",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/6101bb4cfb128c83b13fca38fd8ca287~c5_1080x1080.jpeg?x-expires=1645729200&x-signature=sLrJEDFV9A5tNGjcfpwxyj7dGYw%3D",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/64e95501c830600a62821559501e07db~c5_1080x1080.jpeg?x-expires=1645729200&x-signature=WjHD2HdtncdadQ7RzCgrHHNjtD4%3D",
"https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/e30c6d0e954ec431cbb9aafaaf04dd8a~c5_1080x1080.jpeg?x-expires=1645729200&x-signature=ExL8tsDlKLdjCQEVIaSuRPGkHjI%3D",
"https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/b4fab700030364d677fcfff56d7aa97d~c5_1080x1080.jpeg?x-expires=1645729200&x-signature=fyUaERy2FytRbrfrwvoONCfvzok%3D",
"https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/b4fab700030364d677fcfff56d7aa97d~c5_1080x1080.jpeg?x-expires=1645729200&x-signature=fyUaERy2FytRbrfrwvoONCfvzok%3D",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/b4fab700030364d677fcfff56d7aa97d~c5_1080x1080.jpeg?x-expires=1645729200&x-signature=aGj0%2BhUt%2B3IUSfSDhxaokf%2BqACY%3D"
), authorMeta.following = c(36L, 91L, 86L, 2091L, 17L, 103L,
19L, 0L, 0L, 0L), authorMeta.fans = c(23L, 54L, 61L, 1741L, 5L,
9L, 14900L, 103800L, 103800L, 103800L), authorMeta.heart = c(87L,
536L, 5L, 9168L, 2L, 67L, 149400L, 1800000L, 1800000L, 1800000L
), authorMeta.video = c(13L, 90L, 1L, 78L, 1L, 7L, 45L, 1388L,
1388L, 1388L), authorMeta.digg = c(27L, 101L, 772L, 6976L, 429L,
203L, 202L, 1964L, 1964L, 1964L), musicMeta.musicId = c(6808524996944628736,
6814115937994755072, 6817770512362654720, 6945455736818371584,
6949634983900351488, 6970340831324605440, 6971908113897098240,
6973073959780731904, 6.973112023635e+18, 6973333140853115904),
musicMeta.musicName = c("som original", "som original", "som original",
"som original", "som original", "som original", "som original",
"som original", "som original", "som original"), musicMeta.musicAuthor = c("Aguiar Sillva Barbei",
"Tik Toker", "Lennon Rikelme", "Fernando Medeiros", "user9898887549048",
"diverticity", "Erick Rosário", "Ramon Santos", "Ramon Santos",
"Ramon Santos"), musicMeta.musicOriginal = c(TRUE, TRUE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE), musicMeta.musicAlbum = c("",
"", "", "", "", "", "", "", "", ""), musicMeta.playUrl = c("https://sf16-ies-music-va.tiktokcdn.com/obj/musically-maliva-obj/1662238588713990.mp3",
"https://sf16-ies-music-va.tiktokcdn.com/obj/musically-maliva-obj/1663603269018645.mp3",
"https://sf16-ies-music-va.tiktokcdn.com/obj/musically-maliva-obj/1664496548264966.mp3",
"https://sf16-ies-music-va.tiktokcdn.com/obj/musically-maliva-obj/6945455944255998726.mp3",
"https://sf16-ies-music-va.tiktokcdn.com/obj/musically-maliva-obj/6949635075508144902.mp3",
"https://sf16-ies-music-va.tiktokcdn.com/obj/musically-maliva-obj/6970340898207025925.mp3",
"https://sf16-ies-music-va.tiktokcdn.com/obj/musically-maliva-obj/6971908181308099334.mp3",
"https://sf16-ies-music-va.tiktokcdn.com/obj/musically-maliva-obj/6973074061354191622.mp3",
"https://sf16-ies-music-va.tiktokcdn.com/obj/musically-maliva-obj/6973112153297849093.mp3",
"https://sf16-ies-music-va.tiktokcdn.com/obj/musically-maliva-obj/6973333227930929925.mp3"
), musicMeta.coverThumb = c("https://p16-sign-va.tiktokcdn.com/musically-maliva-obj/1662059894232070~c5_100x100.jpeg?x-expires=1645729200&x-signature=a1nedaPq0w3fUNs5D22xou27Z%2Bc%3D",
"https://p16-sign-va.tiktokcdn.com/musically-maliva-obj/1594805258216454~c5_100x100.jpeg?x-expires=1645729200&x-signature=i2VoIQdaLgOIlElF4mtFV9fj36E%3D",
"https://p16-sign-va.tiktokcdn.com/musically-maliva-obj/1663882871894021~c5_100x100.jpeg?x-expires=1645729200&x-signature=w2LXI2Vx7B8hNRu%2FkMzKzJG81K8%3D",
"https://p16-sign-sg.tiktokcdn.com/aweme/100x100/tos-alisg-avt-0068/d2023f10221a1d54c397daba7ccc0d6b.jpeg?x-expires=1645729200&x-signature=wkmBrklJdcU39hh9FxjCIyoMMqI%3D",
"https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/6101bb4cfb128c83b13fca38fd8ca287~c5_100x100.jpeg?x-expires=1645729200&x-signature=I4CPAUy9pAnJNEodE%2FrRXNvG5zY%3D",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/64e95501c830600a62821559501e07db~c5_100x100.jpeg?x-expires=1645729200&x-signature=PnoiAzDZ0qjn5gcXmgGpA12Fhww%3D",
"https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/e30c6d0e954ec431cbb9aafaaf04dd8a~c5_100x100.jpeg?x-expires=1645729200&x-signature=ycXJmPSP%2BoyeTy9Pu%2FB6O8gCqHM%3D",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/b4fab700030364d677fcfff56d7aa97d~c5_100x100.jpeg?x-expires=1645729200&x-signature=%2FDtsgOj9hhwtvWxTcFU9xfzalZw%3D",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/b4fab700030364d677fcfff56d7aa97d~c5_100x100.jpeg?x-expires=1645729200&x-signature=%2FDtsgOj9hhwtvWxTcFU9xfzalZw%3D",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/b4fab700030364d677fcfff56d7aa97d~c5_100x100.jpeg?x-expires=1645729200&x-signature=%2FDtsgOj9hhwtvWxTcFU9xfzalZw%3D"
), musicMeta.coverMedium = c("https://p77-sign-va.tiktokcdn.com/musically-maliva-obj/1662059894232070~c5_720x720.jpeg?x-expires=1645729200&x-signature=On0S4nK%2Bj0cj%2Bgc7Zj12gNThUTw%3D",
"https://p16-sign-va.tiktokcdn.com/musically-maliva-obj/1594805258216454~c5_720x720.jpeg?x-expires=1645729200&x-signature=vCTDjooZXVQIrMnqUEATBgA2IkY%3D",
"https://p77-sign-va.tiktokcdn.com/musically-maliva-obj/1663882871894021~c5_720x720.jpeg?x-expires=1645729200&x-signature=rJiFs4s%2BruqpkZniOSH52THHdZI%3D",
"https://p16-sign-sg.tiktokcdn.com/aweme/720x720/tos-alisg-avt-0068/d2023f10221a1d54c397daba7ccc0d6b.jpeg?x-expires=1645729200&x-signature=dBlHfEjQmyY6bcTKbN1ZFM%2FweFs%3D",
"https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/6101bb4cfb128c83b13fca38fd8ca287~c5_720x720.jpeg?x-expires=1645729200&x-signature=VXZNIjK%2F8Pb76ae6T1OEopppdQU%3D",
"https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/64e95501c830600a62821559501e07db~c5_720x720.jpeg?x-expires=1645729200&x-signature=PmEV2A4ZH60bT4aqD3gKfw7TCW8%3D",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/e30c6d0e954ec431cbb9aafaaf04dd8a~c5_720x720.jpeg?x-expires=1645729200&x-signature=1kuaJwOm%2BqqiJx7AsQszNy2NMr8%3D",
"https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/b4fab700030364d677fcfff56d7aa97d~c5_720x720.jpeg?x-expires=1645729200&x-signature=OveZTX%2BR936jcxq1B%2BwRtYZ4J6E%3D",
"https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/b4fab700030364d677fcfff56d7aa97d~c5_720x720.jpeg?x-expires=1645729200&x-signature=OveZTX%2BR936jcxq1B%2BwRtYZ4J6E%3D",
"https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/b4fab700030364d677fcfff56d7aa97d~c5_720x720.jpeg?x-expires=1645729200&x-signature=OveZTX%2BR936jcxq1B%2BwRtYZ4J6E%3D"
), musicMeta.coverLarge = c("https://p16-sign-va.tiktokcdn.com/musically-maliva-obj/1662059894232070~c5_1080x1080.jpeg?x-expires=1645729200&x-signature=3jVCVxW73fDbv5a8uBjE1fMuJJ4%3D",
"https://p16-sign-va.tiktokcdn.com/musically-maliva-obj/1594805258216454~c5_1080x1080.jpeg?x-expires=1645729200&x-signature=DSd1ljPdAH68x0r%2Fmc%2Fu12ZJZRo%3D",
"https://p77-sign-va.tiktokcdn.com/musically-maliva-obj/1663882871894021~c5_1080x1080.jpeg?x-expires=1645729200&x-signature=xpRL3daRlDn9LNFeSFcvA0AZGws%3D",
"https://p16-sign-sg.tiktokcdn.com/aweme/1080x1080/tos-alisg-avt-0068/d2023f10221a1d54c397daba7ccc0d6b.jpeg?x-expires=1645729200&x-signature=InxZURrUyON59BteEQh7bRb%2BwUk%3D",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/6101bb4cfb128c83b13fca38fd8ca287~c5_1080x1080.jpeg?x-expires=1645729200&x-signature=sLrJEDFV9A5tNGjcfpwxyj7dGYw%3D",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/64e95501c830600a62821559501e07db~c5_1080x1080.jpeg?x-expires=1645729200&x-signature=WjHD2HdtncdadQ7RzCgrHHNjtD4%3D",
"https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/e30c6d0e954ec431cbb9aafaaf04dd8a~c5_1080x1080.jpeg?x-expires=1645729200&x-signature=ExL8tsDlKLdjCQEVIaSuRPGkHjI%3D",
"https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/b4fab700030364d677fcfff56d7aa97d~c5_1080x1080.jpeg?x-expires=1645729200&x-signature=fyUaERy2FytRbrfrwvoONCfvzok%3D",
"https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/b4fab700030364d677fcfff56d7aa97d~c5_1080x1080.jpeg?x-expires=1645729200&x-signature=fyUaERy2FytRbrfrwvoONCfvzok%3D",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/b4fab700030364d677fcfff56d7aa97d~c5_1080x1080.jpeg?x-expires=1645729200&x-signature=aGj0%2BhUt%2B3IUSfSDhxaokf%2BqACY%3D"
), musicMeta.duration = c(60L, 10L, 14L, 24L, 18L, 59L, 14L,
180L, 180L, 180L), covers.default = c("https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/cba99e4cfab94a30932daf9bd8a46aa9?x-expires=1645664400&x-signature=HmbzlKuZcnhJJdJTDpujB9JElMs%3D",
"https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/e9bbf48d5fff4f399c1568090067e4c9?x-expires=1645664400&x-signature=vi4vhiZA6dRelsrXz6oUYmEqRek%3D",
"https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/271443a40840420abf0ecd036e93b0c4?x-expires=1645664400&x-signature=mqthAEBfkyi56%2Fu8MC0xJbi4omA%3D",
"https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/539c578051b043d8889a0e82b32a214c?x-expires=1645664400&x-signature=zBv3io%2BZd%2Bj%2Bj8Dtqh8TDGf%2FT4E%3D",
"https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/306c760b089741f7bbb2dbaddc714c31?x-expires=1645664400&x-signature=HcAc%2FRN0dV57JmGwQxbU%2BrDpp1E%3D",
"https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/e987bd46d1ad48258264bf8847588f3e?x-expires=1645664400&x-signature=26NvQDYhNN48exwTgCchKFZ%2FH6Y%3D",
"https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/aab8becb2c4d4e5292446c470f33f186?x-expires=1645664400&x-signature=shVdO9EvuLLxjqbNdep4WRoUeMs%3D",
"https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/e60326c0b2fb40a986bec1a1128123f7?x-expires=1645664400&x-signature=eGdid0FIXehKUfSTny5S%2FEWgf%2B8%3D",
"https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/10bd7e951b39441292b3364c374ce0e8?x-expires=1645664400&x-signature=C7ehfu%2FaHzAbPOOp4WBjZwxzsrY%3D",
"https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/9b5285ab683a4c928c2fd19a1f1fcad4?x-expires=1645664400&x-signature=Ia%2BnIAVQYYhboyQ84afNrkOSfRE%3D"
), covers.origin = c("https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/88a5033dfd6f411a9f233455685fa975_1585235839?x-expires=1645664400&x-signature=ChSD93ExjeuP0Bl4Mppiug%2F%2BVAI%3D",
"https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/483d9a6ae7fd4ae4a307c8f4b2cede68_1586563171?x-expires=1645664400&x-signature=Kat8K7YUp4skHR4Dg143lkFUwBo%3D",
"https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/25836970e87040739a72ee538bdaba99_1589240164?x-expires=1645664400&x-signature=%2FNA63Ve%2BEndyFYZJjiHLix3Xa7w%3D",
"https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/b14fa4a08ce74d618ad8a2a426282c84_1617114990?x-expires=1645664400&x-signature=J27jTvMFfhY0ue%2FFETdOcj9zWtU%3D",
"https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/f8a1e34f99e549cf879e0d579dc0707d_1618091022?x-expires=1645664400&x-signature=ub%2F3iB0ZeprBm6%2Fa%2B0IQbpXHLiQ%3D",
"https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/b9f7d74e798c4e6bbc6a0c562853497d_1622908973?x-expires=1645664400&x-signature=wRsztCSJ9SnNU8H4VjnHgZ3gZbM%3D",
"https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/bac4272ae8b14ca38e5fedfc1dfc40ce_1623273879?x-expires=1645664400&x-signature=yadqVt9uR3RPNBCE72YLMtG3ROE%3D",
"https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/558cec2e9a184db590a07a4405ed5702_1623545323?x-expires=1645664400&x-signature=Q9hSOOQoKd8nO8K73yPYVudm4iQ%3D",
"https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/fb68eb9a289d4828a7371a2f7a178f2d_1623554205?x-expires=1645664400&x-signature=l1k4xFcTaDSEIL2VOPwxUhQeNX0%3D",
"https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/b1a0e437d39b440ea0e405112949d220_1623605646?x-expires=1645664400&x-signature=vz13KzRITsWUyseBduWTOz2xZ4E%3D"
), covers.dynamic = c("https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/1c3ce2c68cff4f0982410301f60f0246_1585235840?x-expires=1645664400&x-signature=U%2FbcCJuu9u8T%2FmfARMAPO1fntPM%3D",
"https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/82136e8de6ef4febb646a98a292437a0_1586563170?x-expires=1645664400&x-signature=%2FPKHw0L2fLSUjMe5DsqjEKcuoSo%3D",
"https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/d44ba90030974009bf0d7beb44ca8386_1589240164?x-expires=1645664400&x-signature=CiGmFb54%2BLBSpY5eNHyz8%2Frvdv4%3D",
"https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/26f3c1c442b24d6cb7644ece3f54efd0_1617114990?x-expires=1645664400&x-signature=JUMoVTx7I4aPnwJVd1zv%2FZ%2BREPE%3D",
"https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/16308aa2d9724d9196a1cce526394eb2_1618091023?x-expires=1645664400&x-signature=RsVbM%2F5afCuWHtDLG%2BC1le9XadA%3D",
"https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/9e83a88c4cc348139ff6960234609216_1622908972?x-expires=1645664400&x-signature=HS4axvDTaDG4hAydkhreGSOkrqg%3D",
"https://p77-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/acfd4f691fff44dc9bd9a01380404701_1623273879?x-expires=1645664400&x-signature=39iKVMxfom1RA7ahLnnxEDj%2BBW4%3D",
"https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/4a0c1930f9ce4809ae44ef25405a4370_1623545322?x-expires=1645664400&x-signature=SpLVaS5vDUGxTWj%2BfKlKJva%2F20A%3D",
"https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/0d653827737745a8a006b2cc7ffd9640_1623554208?x-expires=1645664400&x-signature=C93vK7%2BNxFufYmDbNVJd7QdF0pI%3D",
"https://p16-sign-va.tiktokcdn.com/obj/tos-maliva-p-0068/ccfa2a83ae1d48e091a637413f7eb7f7_1623605649?x-expires=1645664400&x-signature=zXwlq3sMW0xAVNdMryTY0rDUCUc%3D"
), videoUrl = c("https://v16-webapp.tiktok.com/38ac26a15637fe281520b4fe9fb95434/6216dacb/video/tos/useast2a/tos-useast2a-pve-0068/f4e27ded4ea64efca5f18e1a5d8393dd/?a=1988&br=2570&bt=1285&cd=0%7C0%7C0%7C0&ch=0&cr=0&cs=0&dr=0&ds=2&er=&ft=XOQ9-3._nz7TheyLUDXq&l=202202231908300101921662190507E861&lr=tiktok_m&mime_type=video_mp4&net=0&pl=0&qs=0&rc=M3g2cTtqOWhmczMzODczM0ApNmY4NzY8aTxmNztnPDVmOmdpYy9vZV5eYXJfLS1fMTZzczBfNDExNjVfNi4uLWJeYWI6Yw%3D%3D&vl=&vr=",
"https://v16-webapp.tiktok.com/86c8384953c1838b24b4908a5e4f1291/6216da8f/video/tos/useast2a/tos-useast2a-ve-0068c003/47def1dbd3b24722ac7fa683975e355f/?a=1988&br=2470&bt=1235&cd=0%7C0%7C0%7C0&ch=0&cr=0&cs=0&dr=0&ds=3&er=&ft=XOQ9-3._nz7Th2yLUDXq&l=2022022319082701019103203909060E21&lr=tiktok_m&mime_type=video_mp4&net=0&pl=0&qs=0&rc=M2t4bWVveHdqdDMzaDczM0ApN2Y3ZmlmPGU7N2lkNzRmM2djbjBxY25uNjVfLS02MTZzcy4yYWExL15jYDVfX14yXmI6Yw%3D%3D&vl=&vr=",
"https://v16-webapp.tiktok.com/324b378f81c3556ebf50cbcd2c377b5e/6216da99/video/tos/useast2a/tos-useast2a-ve-0068c001/30287829751d482f815a0d7ca95c7bbd/?a=1988&br=1318&bt=659&cd=0%7C0%7C0%7C0&ch=0&cr=0&cs=0&dr=0&ds=3&er=&ft=XOQ9-3._nz7Th2yLUDXq&l=2022022319082701019103203909060E21&lr=tiktok_m&mime_type=video_mp4&net=0&pl=0&qs=0&rc=ajU3czhpPDx4dDMzZzczM0ApNDU4NTc3Z2QzN2hlMzszNWdrL3EzL2ZnLnBfLS02MTZzc2AuLzBgMDYtNC0uLmAzMGE6Yw%3D%3D&vl=&vr=",
"https://v16-webapp.tiktok.com/1e9995549209307bfa123aea504b8fe8/6216daa5/video/tos/useast2a/tos-useast2a-pve-0068/2bb71ae377de438cba8316d317ca572e/?a=1988&br=1416&bt=708&cd=0%7C0%7C0%7C0&ch=0&cr=0&cs=0&dr=0&ds=2&er=&ft=XOQ9-3._nz7Th0yLUDXq&l=202202231908290101921662190507E745&lr=tiktok_m&mime_type=video_mp4&net=0&pl=0&qs=0&rc=MzZzeTM8dW9tNDMzNzczM0ApOjZnZzY3ZWVmNzppOzM2OGdzNWpjbTU1YmVgLS1kMTZzcy9jLS40Ni8zMTIuM2AwX2A6Yw%3D%3D&vl=&vr=",
"https://v16-webapp.tiktok.com/5a37234b8ce3450d432ebc076799778d/6216da9e/video/tos/useast2a/tos-useast2a-ve-0068c003/c8ca04f8887f43739ff6164d01677c4a/?a=1988&br=1440&bt=720&cd=0%7C0%7C0%7C0&ch=0&cr=0&cs=0&dr=0&ds=3&er=&ft=XOQ9-3._nz7ThzyLUDXq&l=202202231908280102231230141108A10D&lr=tiktok_m&mime_type=video_mp4&net=0&pl=0&qs=0&rc=anhmb3E7dXAzNDMzNzczM0ApaDhmNWRoOztlN2VoaTRpaWdvajVsM2wvbG1gLS1kMTZzcy9fYi82XzY1Xi1fX181LjM6Yw%3D%3D&vl=&vr=",
"https://v16-webapp.tiktok.com/c37cc04b74d23c7072ac20f090566a37/6216dac8/video/tos/useast2a/tos-useast2a-ve-0068c002/2043d6424b2d40bd8c8067ba6c560530/?a=1988&br=1384&bt=692&cd=0%7C0%7C0%7C0&ch=0&cr=0&cs=0&dr=0&ds=3&er=&ft=XOQ9-3._nz7Th0yLUDXq&l=202202231908290101921662190507E745&lr=tiktok_m&mime_type=video_mp4&net=0&pl=0&qs=0&rc=MzZ1eHZpb3VzNTMzNzczM0ApNTc8OmVnO2VkN2lkNjpoaWdrMDQ0ZGQwcHFgLS1kMTZzcy4uYy4zYWNjYzQyYzMwYDU6Yw%3D%3D&vl=&vr=",
"https://v16-webapp.tiktok.com/6e1fded31f24294541cc6d269ec98dad/6216da96/video/tos/useast2a/tos-useast2a-pve-0068/9ada809b0c424b5ebb51385cda626c84/?a=1988&br=1528&bt=764&cd=0%7C0%7C1%7C0&ch=0&cr=0&cs=0&cv=1&dr=0&ds=3&er=&ft=XOQ9-3._nz7ThGyLUDXq&l=202202231908230102230790121703D465&lr=tiktok_m&mime_type=video_mp4&net=0&pl=0&qs=0&rc=M25wOjs1NXNtNjMzNzczM0ApaGQ5Njw2OjtnN2Y3Z2ZpZ2dhcS0ybzYvLy1gLS1kMTZzczIwY18tYy8xLmMuNDVjLi46Yw%3D%3D&vl=&vr=",
"https://v16-webapp.tiktok.com/ccb06d3c99f07676e58957a16c0c45eb/6216db32/video/tos/useast2a/tos-useast2a-ve-0068c004/ca0670f6ce1f473583cd082de3472250/?a=1988&br=1060&bt=530&cd=0%7C0%7C1%7C0&ch=0&cr=0&cs=0&cv=1&dr=0&ds=3&er=&ft=XOQ9-3._nz7ThVyLUDXq&l=202202231908140101901860440C08645A&lr=tiktok_m&mime_type=video_mp4&net=0&pl=0&qs=0&rc=M2V4M21rdXNvNjMzNzczM0ApNThkZTM7OTw5NzZnNjY2OWczMGluaWkzNS9gLS1kMTZzcy1eMV81LzZiLS4tYi8xLV86Yw%3D%3D&vl=&vr=",
"https://v16-webapp.tiktok.com/4cd95bfd3e5f6615a0a82397b4bc8047/6216db32/video/tos/useast2a/tos-useast2a-ve-0068c004/58edeec6ee0a4681b02e7372657fbc3c/?a=1988&br=1108&bt=554&cd=0%7C0%7C1%7C0&ch=0&cr=0&cs=0&cv=1&dr=0&ds=3&er=&ft=XOQ9-3._nz7ThVyLUDXq&l=202202231908140101901860440C08645A&lr=tiktok_m&mime_type=video_mp4&net=0&pl=0&qs=0&rc=M29wczRrazhxNjMzNzczM0ApZzc8PDk4ZjtpNzo4ZTo5aWcyL2ZqMTUyYy9gLS1kMTZzc2FiY142NDI1LS42LzM2YDA6Yw%3D%3D&vl=&vr=",
"https://v16-webapp.tiktok.com/478c09e780bccef0f118a1b011401f5e/6216db35/video/tos/useast2a/tos-useast2a-ve-0068c002/1df136f0b22e4a32b91deb41eda134aa/?a=1988&br=690&bt=345&cd=0%7C0%7C1%7C0&ch=0&cr=0&cs=0&cv=1&dr=0&ds=3&er=&ft=XOQ9-3._nz7ThOyLUDXq&l=2022022319081701022307215816072093&lr=tiktok_m&mime_type=video_mp4&net=0&pl=0&qs=0&rc=M3g7Z2ZzMzQ3NjMzNzczM0ApNTg2ODwzaGQ3NzczO2c2NGdrZjFqcHM1LjBgLS1kMTZzc2JeNTQuXmEzMi82MS1iYjE6Yw%3D%3D&vl=&vr="
), videoUrlNoWaterMark = c(NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA), videoApiUrlNoWaterMark = c(NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA), videoMeta.height = c(480L, 1024L, 1024L,
480L, 576L, 1024L, 1024L, 1024L, 1024L, 1024L), videoMeta.width = c(848L,
576L, 576L, 848L, 1024L, 576L, 576L, 576L, 576L, 576L), videoMeta.duration = c(60L,
4L, 14L, 24L, 18L, 59L, 14L, 180L, 180L, 180L), diggCount = c(2L,
6L, 5L, 17L, 2L, 3L, 33L, 30200L, 23900L, 663L), shareCount = c(0L,
0L, 0L, 9L, 0L, 0L, 0L, 1540L, 468L, 37L), playCount = c(30L,
57L, 74L, 385L, 23L, 24L, 2783L, 930500L, 430600L, 34600L
), commentCount = c(0L, 0L, 0L, 0L, 0L, 0L, 1L, 224L, 205L,
16L), downloaded = c(FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
FALSE, FALSE, FALSE, FALSE), mentions = c("[]", "[]", "[]",
"[]", "[]", "[]", "[]", "[\"#luizguilhermeol2\"]", "[\"#vinicius\"]",
"[]"), hashtags = c("[{\"id\":\"1662240138893317\",\"name\":\"globolixoo\",\"title\":\"\",\"cover\":\"\"}]",
"[{\"id\":\"1662240138893317\",\"name\":\"globolixoo\",\"title\":\"\",\"cover\":\"\"}]",
"[{\"id\":\"1662240138893317\",\"name\":\"globolixoo\",\"title\":\"\",\"cover\":\"\"}]",
"[{\"id\":\"1662240138893317\",\"name\":\"globolixoo\",\"title\":\"\",\"cover\":\"\"}]",
"[{\"id\":\"1662240138893317\",\"name\":\"globolixoo\",\"title\":\"\",\"cover\":\"\"}]",
"[{\"id\":\"1662240138893317\",\"name\":\"globolixoo\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"56170\",\"name\":\"mentira\",\"title\":\"\",\"cover\":\"\"}]",
"[{\"id\":\"1661865863689221\",\"name\":\"lulaxbolsonaro\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"1662240138893317\",\"name\":\"globolixoo\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"1648865153779717\",\"name\":\"bolsonaro2022\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"42164\",\"name\":\"foryou\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"1518647\",\"name\":\"fory\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"1105452\",\"name\":\"fyyy\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"48919866\",\"name\":\"golpista\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"37986936\",\"name\":\"obrigadogalera\",\"title\":\"\",\"cover\":\"\"}]",
"[{\"id\":\"71910226\",\"name\":\"flamengooooo\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"1653550338924549\",\"name\":\"paravocefo\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"1688242636665861\",\"name\":\"dublagem19\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"1699304938756101\",\"name\":\"flamengosergipe\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"44804\",\"name\":\"copaamerica\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"4296838\",\"name\":\"flamengo\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"1650748975425541\",\"name\":\"flamengolibertadores\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"5064773\",\"name\":\"eriksen\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"1662240138893317\",\"name\":\"globolixoo\",\"title\":\"\",\"cover\":\"\"}]",
"[{\"id\":\"1662240138893317\",\"name\":\"globolixoo\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"1650748975425541\",\"name\":\"flamengolibertadores\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"4296838\",\"name\":\"flamengo\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"44804\",\"name\":\"copaamerica\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"1699304938756101\",\"name\":\"flamengosergipe\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"1688242636665861\",\"name\":\"dublagem19\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"83884\",\"name\":\"neymar\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"45874915\",\"name\":\"globol\",\"title\":\"\",\"cover\":\"\"}]",
"[{\"id\":\"83884\",\"name\":\"neymar\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"5064773\",\"name\":\"eriksen\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"1662240138893317\",\"name\":\"globolixoo\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"1650748975425541\",\"name\":\"flamengolibertadores\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"1688242636665861\",\"name\":\"dublagem19\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"1699304938756101\",\"name\":\"flamengosergipe\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"44804\",\"name\":\"copaamerica\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"88764338\",\"name\":\"foryoupage\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"30873973\",\"name\":\"paravoce\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"1663903392662534\",\"name\":\"globolixooo\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"4296838\",\"name\":\"flamengo\",\"title\":\"\",\"cover\":\"\"},{\"id\":\"1105452\",\"name\":\"fyyy\",\"title\":\"\",\"cover\":\"\"}]"
), effectStickers = c("[]", "[{\"id\":\"333023\",\"name\":\"Humor de feriado\"}]",
"[]", "[]", "[]", "[]", "[]", "[]", "[]", "[]")), row.names = c(NA,
10L), class = "data.frame")
UpdateII removed previous solutions:
library(dplyr)
library(tidyr)
df %>%
mutate(id = row_number()) %>%
separate_rows(hashtags, sep = '\",\"name\":\"') %>%
separate_rows(hashtags, sep = '\",\"title\"') %>%
filter(str_detect(hashtags, '^[\\w]')) %>%
group_by(id) %>%
summarise(hashtags = toString(hashtags), .groups = "drop") %>%
select(-id)
hashtags
<chr>
1 globolixoo
2 globolixoo
3 globolixoo
4 globolixoo
5 globolixoo
6 globolixoo, mentira
7 lulaxbolsonaro, globolixoo, bolsonaro2022, foryou, fory, fyyy, golpista, obrigadogalera
8 flamengooooo, paravocefo, dublagem19, flamengosergipe, copaamerica, flamengo, flamengolibertado…
9 globolixoo, flamengolibertadores, flamengo, copaamerica, flamengosergipe, dublagem19, neymar, g…
10 neymar, eriksen, globolixoo, flamengolibertadores, dublagem19, flamengosergipe, copaamerica, fo…
Sorry if this is a repeat question but I haven't managed to find an answer yet since my data frame has to be split. I am trying to plot two regression lines on one plot, with a regression line for data in period 1 (1815-1899)and a regression line for data in period 2 (1900-2013). I have used dplyr to split the data to run the two separate regressions but can't work out how to get them on the same graph as you seem to need the data frame in the ggplot() command for it to plot the line. Can anyone help?
Thanks.
library(tidyverse)
brest<-read.csv("brest.csv",header=TRUE) ## read in csv
brest<- na.omit(brest) ## get rid of NAs
brestp1<- select(filter(brest, period == 1),c(year,slr,period)) ## Divide into periods
brestp2<- select(filter(brest, period == 2),c(year,slr,period))
fit1 <- lm(slr ~ year, data = brestp1) ## Run lms
summary(fit1)
fit2<- lm(slr ~ year, data = brestp2)
summary(fit2)
## plot graph
ggplot(brestp1, aes(x = year, y = slr)) + ### Need not only brestp1 but also brestp2
geom_point() +
stat_smooth(method = "lm",se=FALSE)+
theme_classic()
## Data
## Brest period 1
structure(list(year = 1815:1820, slr = c(6926L, 6959L, 6945L,
6965L, 6941L, 6909L), period = c(1L, 1L, 1L, 1L, 1L, 1L)), na.action = structure(c(`30` = 30L,
`31` = 31L, `32` = 32L, `33` = 33L, `34` = 34L, `35` = 35L, `36` = 36L,
`37` = 37L, `38` = 38L, `39` = 39L, `51` = 51L, `52` = 52L, `53` = 53L,
`54` = 54L, `138` = 138L, `139` = 139L, `140` = 140L, `141` = 141L,
`142` = 142L, `143` = 143L, `144` = 144L, `145` = 145L, `146` = 146L
), class = "omit"), row.names = c(NA, 6L), class = "data.frame")
##Brest period 2
structure(list(year = 1900:1905, slr = c(6936L, 6916L, 6923L,
6976L, 6931L, 6913L), period = c(2L, 2L, 2L, 2L, 2L, 2L)), na.action = structure(c(`30` = 30L,
`31` = 31L, `32` = 32L, `33` = 33L, `34` = 34L, `35` = 35L, `36` = 36L,
`37` = 37L, `38` = 38L, `39` = 39L, `51` = 51L, `52` = 52L, `53` = 53L,
`54` = 54L, `138` = 138L, `139` = 139L, `140` = 140L, `141` = 141L,
`142` = 142L, `143` = 143L, `144` = 144L, `145` = 145L, `146` = 146L
), class = "omit"), row.names = c(NA, 6L), class = "data.frame")
Use geom_smooth with separate data:
ggplot() +
geom_smooth(aes(x = year, y = slr), data = brest1,
method = "lm", se = FALSE, color = "red") +
geom_smooth(aes(x = year, y = slr), data = brest2,
method = "lm", se = FALSE, color = "blue") +
geom_point(aes(x = year, y = slr), data = brest1, color = "red") +
geom_point(aes(x = year, y = slr), data = brest2, color = "blue")
I have several dataframes that I am applying a function to
The function works but I would like to lapply it to several dataframes and output the result according to the input names.
Here is an example of one of the dataframes
structure(list(chr = structure(c(1L, 1L, 1L), .Label = c("chr1",
"chr10", "chr11", "chr12", "chr13", "chr14", "chr15", "chr16",
"chr17", "chr18", "chr19", "chr2", "chr20", "chr21", "chr22",
"chr3", "chr4", "chr5", "chr6", "chr7", "chr8", "chr9", "chrX",
"chrY"), class = "factor"), leftPos = c(100260254L, 100735342L,
100805662L), strand.x = structure(c(1L, 1L, 2L), .Label = c("-",
"+"), class = "factor"), X50CellJ_SLX.9395.FSeqJ.fq.gz = c(7L,
295L, 132L), Cytospongex10_SLX.9395.FSeqK.fq.gz = c(72L, 256L,
148L), FFPE20X_SLX.9395.fq.gz = c(5L, 74L, 36L), Tumour10_SMACCO_AH_088_SLX.9396.FSeqH.fq.gz = c(13L,
154L, 65L), Tumour11_SMACCO_SH_020_SLX.9396.FSeqI.fq.gz = c(1L,
0L, 0L), Tumour12_SMACCO_ED_008_SLX.9396.FSeqJ.fq.gz = c(3L,
25L, 8L), Tumour13_SMACCO_AH_086_SLX.9396.FSeqK.fq.gz = c(7L,
120L, 28L), Tumour1_SMACCO_AH_100_SLX.9396.FSeqA.fq.gz = c(0L,
0L, 0L), Tumour2_SMACCO_AH_058_SLX.9396.FSeqB.fq.gz = c(24L,
98L, 42L), Tumour3_SMACCO_SH_051_SLX.9396.FSeqC.fq.gz = c(29L,
92L, 29L), Tumour4_SMACCO_ED_031_SLX.9396.FSeqD.fq.gz = c(18L,
53L, 14L), Tumour5_SMACCO_RS_027_SLX.9396.FSeqE.fq.gz = c(8L,
93L, 17L), Tumour7_SMACCO_AH_026_SLX.9396.FSeqF.fq.gz = c(30L,
205L, 60L), Tumour9_SMACCO_ST_024_SLX.9396.FSeqG.fq.gz = c(15L,
129L, 17L), strand.y = structure(c(1L, 1L, 2L), .Label = c("-",
"+"), class = "factor"), Tumour14_SMACCO_AH_094_SLX.9394.FSeqA.fq.gz = c(0L,
7L, 3L), Tumour15_SMACCO_WG_006_SLX.9394.FSeqB..fq.gz = c(3L,
19L, 4L), Tumour16_SMACCO_ST_035_SLX.9394.FSeqC.fq.gz = c(1L,
23L, 8L), Tumour17_SMACCO_ST_034_SLX.9394.fq.gz = c(7L, 26L,
5L), Control19_SLX.9394.FSeqE.fq.gz = c(51L, 256L, 36L), Control20_SLX.9394.FSeqF.fq.gz = c(23L,
110L, 34L), Control21_SLX.9394.FSeqG..fq.gz = c(30L, 56L,
11L), Control22_SLX.9394.FSeqH.fq.gz = c(22L, 72L, 24L), Control23_SLX.9394.FSeqI.fq.gz = c(10L,
23L, 2L), Control25_SLX.9394.FSeqJ.fq.gz = c(17L, 72L, 8L),
Control27_SLX.9394.FSeqK.fq.gz = c(10L, 21L, 9L), Control28_SLX.9395.FSeqA.fq.gz = c(13L,
40L, 4L), Control29_SLX.9395.FSeqB.fq.gz = c(14L, 39L,
6L), Control30_SLX.9395.FSeqC.fq.gz = c(5L, 32L, 5L),
Control31_SLX.9395.FSeqD.fq.gz = c(7L, 11L, 5L), Control32_SLX.9395.FSeqE.fq.gz = c(5L,
32L, 4L), Control33_SLX.9395.FSeqF.fq.gz = c(10L, 25L,
6L), Control34_SLX.9395.FSeqG.fq.gz = c(3L, 32L, 1L),
Control35_SLX.9395.FSeqH.fq.gz = c(10L, 33L, 0L), Controls = c(0L,
0L, 0L), Samples = c(0L, 0L, 0L)), .Names = c("chr", "leftPos",
"strand.x", "X50CellJ_SLX.9395.FSeqJ.fq.gz", "Cytospongex10_SLX.9395.FSeqK.fq.gz",
"FFPE20X_SLX.9395.fq.gz", "Tumour10_SMACCO_AH_088_SLX.9396.FSeqH.fq.gz",
"Tumour11_SMACCO_SH_020_SLX.9396.FSeqI.fq.gz", "Tumour12_SMACCO_ED_008_SLX.9396.FSeqJ.fq.gz",
"Tumour13_SMACCO_AH_086_SLX.9396.FSeqK.fq.gz", "Tumour1_SMACCO_AH_100_SLX.9396.FSeqA.fq.gz",
"Tumour2_SMACCO_AH_058_SLX.9396.FSeqB.fq.gz", "Tumour3_SMACCO_SH_051_SLX.9396.FSeqC.fq.gz",
"Tumour4_SMACCO_ED_031_SLX.9396.FSeqD.fq.gz", "Tumour5_SMACCO_RS_027_SLX.9396.FSeqE.fq.gz",
"Tumour7_SMACCO_AH_026_SLX.9396.FSeqF.fq.gz", "Tumour9_SMACCO_ST_024_SLX.9396.FSeqG.fq.gz",
"strand.y", "Tumour14_SMACCO_AH_094_SLX.9394.FSeqA.fq.gz",
"Tumour15_SMACCO_WG_006_SLX.9394.FSeqB..fq.gz", "Tumour16_SMACCO_ST_035_SLX.9394.FSeqC.fq.gz",
"Tumour17_SMACCO_ST_034_SLX.9394.fq.gz", "Control19_SLX.9394.FSeqE.fq.gz",
"Control20_SLX.9394.FSeqF.fq.gz", "Control21_SLX.9394.FSeqG..fq.gz",
"Control22_SLX.9394.FSeqH.fq.gz", "Control23_SLX.9394.FSeqI.fq.gz",
"Control25_SLX.9394.FSeqJ.fq.gz", "Control27_SLX.9394.FSeqK.fq.gz",
"Control28_SLX.9395.FSeqA.fq.gz", "Control29_SLX.9395.FSeqB.fq.gz",
"Control30_SLX.9395.FSeqC.fq.gz", "Control31_SLX.9395.FSeqD.fq.gz",
"Control32_SLX.9395.FSeqE.fq.gz", "Control33_SLX.9395.FSeqF.fq.gz",
"Control34_SLX.9395.FSeqG.fq.gz", "Control35_SLX.9395.FSeqH.fq.gz",
"Controls", "Samples"), row.names = c(NA, 3L), class = "data.frame")
Here is what I have so far
mylist <- list(A = OriginalMeta , B = SLX9392 , C = SLX9393, D = SLX9397, E = Gastric, F = Dysplasia, G = GoodDysplasia, H = Cholangio, I = LCM_PS14_1105_1F)
sortIt <- function(df1) {
df1$strand.x<- NULL
df1$strand.y<- NULL
df1$strand<-NULL
df1$X.<-NULL
names(df1)[1] <- c("chr")
#Get rid of X and Y chromosomes
df1 <- df1[!grepl("chrX", df1$chr), ]
df1 <- df1[!grepl("chrY", df1$chr), ]
xyAss3<-df1
return(xyAss3)
}
lapply(names(mylist),
sortIt(x)write.csv(mylist[x],
file =paste0(x,'.csv')))
The thing is I just dont know how to feed the mylist into the function. Should I call x in the lapply df1? I'm a bit confused as to how to tie it all together.
I think you'll do better to fold the creation of the .csv into your function and then use a for loop to apply that function to each object in your list in turn. So something like this, where df is the sample data frame you posted:
mylist <- list(A = df, B = df)
sortIt <- function(i) {
df = mylist[[i]]
df[,"strand.x"] <- NULL
df[,"strand.y"] <- NULL
df[,"strand"] <- NULL
df[,"X."] <- NULL
names(df) <- c("chr", names(df)[2:length(names(df))])
df <- df[!grepl("chrX", df$chr), ]
df <- df[!grepl("chrY", df$chr), ]
write.csv(df, file = paste0(names(mylist)[i], ".csv"), row.names=FALSE)
}
for (i in seq(length(mylist))) {sortIt(i)}
If you were trying to create a new object in your workspace, then one of the apply functions would be a better bet. But when you're trying to output files, I think you need to use a for loop instead.
Not really sure what you are trying to achieve, but guessing that you want to save the transformed data frame to a file with a name taken from the list, this could do the job (it should work with the rest of your code - note the [[1]]):
lapply(names(mylist),
function(x) write.csv(sortIt(mylist[x][[1]]),
file = paste0(x,'.csv')))
Another option is to use mapply, here I'm attaching a complete example:
# create the data
dframes <- lapply(1:3, function(x) data.frame(x=rnorm(10), y=runif(10)))
names(dframes) <- LETTERS[1:3]
# the transformation function
sortdf <- function(df) df[order(df$x),]
# two variants of apply
lapply(names(dframes),
function(name) write.csv(sortdf(dframes[name][[1]]),
file=paste0(name, '.csv')))
# mapply does not have the ugly [[1]] syntax bit, I'd prefer it myself
mapply(function(name, df) write.csv(sortdf(df), file=paste0(name, '.csv')),
names(dframes),
dframes)
This is my vector
head(sep)
I must find percent of all SEP 11 in each row.
For instance, in first row, percent of SEP 11 is
100 * ((63 + 124)/ (63 + 124 + 0 + 0))
And would like this stored in newly created 8th column
Thanks
dput
> dput(head(sep))
structure(list(Site = structure(1:6, .Label = c("31R001", "31R002",
"31R003", "31R004", "31R005", "31R006", "31R007", "31R008", "31R011",
"31R013", "31R014", "31R016", "31R018", "31R019", "31R020", "31R021",
"31R022", "31R023", "31R024", "31R025", "31R026", "31R027", "31R029",
"31R030", "31R031", "31R032", "31R034", "31R035", "31R036", "31R038",
"31R039", "31R040", "31R041", "31R042", "31R043", "31R044", "31R045",
"31R046", "31R048", "31R049", "31R050", "31R051", "31R052", "31R053",
"31R054", "31R055", "31R056", "31R057", "31R058", "31R059", "31R060",
"31R061", "31R069", "31R071", "31R072", "31R075", "31R435", "31R440",
"31R445", "31R450", "31R455", "31R460", "31R470", "31R600", "31R722",
"31R801", "31R825", "31R826", "31R829", "31R840", "31R843", "31R861",
"31R880"), class = "factor"), Latitude = c(33.808874, 33.877256,
33.820825, 33.852373, 33.829697, 33.810274), Longitude = c(-117.844048,
-117.700135, -117.811845, -117.795516, -117.787532, -117.830429
), Windows.SEP.11 = c(63L, 174L, 11L, 85L, 163L, 71L), Mac.SEP.11 = c(0L,
1L, 4L, 0L, 0L, 50L), Windows.SEP.12 = c(124L, 185L, 9L, 75L,
23L, 5L), Mac.SEP.12 = c(0L, 1L, 32L, 1L, 0L, 50L)), .Names = c("Site",
"Latitude", "Longitude", "Windows.SEP.11", "Mac.SEP.11", "Windows.SEP.12",
"Mac.SEP.12"), row.names = c(NA, 6L), class = "data.frame")
Assuming that you want to get the rowSums of columns that have 'Windows' as column names, we subset the dataset ("sep1") using grep. Then get the rowSums(Sub1), divide by the rowSums of all the numeric columns (sep1[4:7]), multiply by 100, and assign the results to a new column ("newCol")
Sub1 <- sep1[grep("Windows", names(sep1))]
sep1$newCol <- 100*rowSums(Sub1)/rowSums(sep1[4:7])
I have the following data set
structure(list(Collimator = structure(c(1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L), .Label = c("n", "y"), class = "factor"), angle = c(0L,
15L, 30L, 45L, 60L, 75L, 90L, 105L, 120L, 135L, 150L, 165L, 180L,
0L, 15L, 30L, 45L, 60L, 75L, 90L, 105L, 120L, 135L, 150L, 165L,
180L), X1 = c(2099L, 11070L, 17273L, 21374L, 23555L, 23952L,
23811L, 21908L, 19747L, 17561L, 12668L, 6008L, 362L, 53L, 21L,
36L, 1418L, 6506L, 10922L, 12239L, 8727L, 4424L, 314L, 38L, 21L,
50L), X2 = c(2126L, 10934L, 17361L, 21301L, 23101L, 23968L, 23923L,
21940L, 19777L, 17458L, 12881L, 6051L, 323L, 40L, 34L, 46L, 1352L,
6569L, 10880L, 12534L, 8956L, 4418L, 344L, 58L, 24L, 68L), X3 = c(2074L,
11109L, 17377L, 21399L, 23159L, 23861L, 23739L, 21910L, 20088L,
17445L, 12733L, 6046L, 317L, 45L, 26L, 46L, 1432L, 6495L, 10862L,
12300L, 8720L, 4343L, 343L, 38L, 34L, 60L), average = c(2099.6666666667,
11037.6666666667, 17337, 21358, 23271.6666666667, 23927, 23824.3333333333,
21919.3333333333, 19870.6666666667, 17488, 12760.6666666667,
6035, 334, 46, 27, 42.6666666667, 1400.6666666667, 6523.3333333333,
10888, 12357.6666666667, 8801, 4395, 333.6666666667, 44.6666666667,
26.3333333333, 59.3333333333)), .Names = c("Collimator", "angle",
"X1", "X2", "X3", "average"), row.names = c(NA, -26L), class = "data.frame")
I first scale average counts for both collimator y and n to a make the highest counts 1
df <- ddply(df, .(Collimator), transform,
norm.average = average / max(average))
and plot the curves:
ggplot(df, aes(x=angle,y=norm.average,col=Collimator)) +
geom_point() + geom_line()
Using geom_line is quite unpleasing on the eye and I would rather fit to the data using stat_smooth. Each data set should be symmetric about the mean so I think a Gaussian fit should be ideal. How can I fit a Gaussian to the dataset collimator="y" and collimator="n" in ggplot2 or using base R. Also I would like to output the mean and standard deviation. Can this be done?
By definition your data is not Gaussian but a kind of Gaussian-like shape, and here is the example of the visualization of fitting:
fit <- dlply(df, .(Collimator), function(x) {
co <- coef(nls(norm.average ~ exp(-(angle - m)^2/(2 * s^2)), data = x, start = list(s = 50, m = 80)))
stat_function(fun = function(x) exp(-(x - co["m"])^2/(2 * co["s"]^2)), data = x)
})
ggplot(df, aes(x = angle, y = norm.average, col = Collimator)) + geom_point() + fit
Updated
To obtain the parameters:
fit <- dlply(df, .(Collimator), function(x) {
co <- coef(nls(norm.average ~ exp(-(angle - m)^2/(2 * s^2)), data = x, start = list(s = 50, m = 80)))
r <- stat_function(fun = function(x) exp(-(x - co["m"])^2/(2 * co["s"]^2)), data = x)
attr(r, ".coef") <- co
r
})
then,
> ldply(fit, attr, ".co")
Collimator s m
1 n 52.99117 82.60820
2 y 21.99518 86.61268