I am trying to generate the tendril plot using the Tendril package, however I am unable to generate the plot and results in error. I tried changing the function argument values but no success. Please help me resolve the issue
I used the adae data from the Tplyr package
library(Tendril)
library(Tplyr)
adae <- Tplyr::tplyr_adae %>% filter(SAFFL=='Y' & TRTAN %in% c(0, 54)) %>% select(USUBJID, TRTA, ASTDY, AEDECOD) %>%
arrange(USUBJID, TRTA, AEDECOD, ASTDY) %>% filter(ASTDY>0)
names(adae) <- tolower(names(adae))
SubjList <- adae %>% select(usubjid, trta)
data <- Tendril(mydata = adae,
rotations = 70,
AEfreqThreshold = 1,
Tag = "Comment",
Treatments = c("Placebo", "Xanomeline Low Dose"),
Unique.Subject.Identifier = "usubjid",
Terms = "aedecod",
Treat = "trta",
StartDay = "astdy",
SubjList = SubjList,
SubjList.subject = "usubjid",
SubjList.treatment = "trta",
suppress_warnings = TRUE
)
res <- plot(data, coloring = "Terms")
Error
Error in .validate_tendril_results(tab) :
No sample with the defined frequency threshold
In addition: Warning messages:
1: In xtfrm.data.frame(x) : cannot xtfrm data frames
2: In xtfrm.data.frame(x) : cannot xtfrm data frames