simplifyEnrichment icon indicating copy to clipboard operation
simplifyEnrichment copied to clipboard

Usage of anno_word_cloud

Open hsiaoyi0504 opened this issue 2 years ago • 1 comments

Hi, thanks for creating such a great series of packages. When I tried to create word_cloud for the heatmap

term <- list("This is the first sentence.")
align_to_index <- list(100)
rna_row_ha <- rowAnnotation(wc = anno_word_cloud(align_to_index, term, add_new_line = TRUE, value_range = c(1, 1), fontsize_range = c(10, 10)))

I will get an error

Error in anno_word_cloud(align_to_index, term, add_new_line = TRUE, value_range = c(1,  : 
  Error in `class<-`(unlist(lapply(x, as.unit), recursive = FALSE), c("unit",  : 
  attempt to set an attribute on NULL
2: stop(oe)
1: anno_word_cloud(align_to_index, term)

Do I misunderstand the data structure of inputs?

hsiaoyi0504 avatar Mar 01 '22 17:03 hsiaoyi0504

Sorry I missed this issue!

term and align_to_index should have names so that these two can be matched.

term <- list(a = "This is the first sentence.")
align_to_index <- list(a = 100)

jokergoo avatar Jun 01 '22 07:06 jokergoo