Change column width in ReportingTools
0
0
Entering edit mode
@benediktathmer-8753
Last seen 8.6 years ago

Hi,

I would like to know, how to change the column width of the HTML table in ReportingTools. I tried to use the hwriter function, but this results in a complete layout change of the table:

rpt.df <- rpt.df[sub,]
imagename.link <- paste0("./006_reports/barplots/", imagename[sub])
rpt.df$Image <- hwriteImage(imagename.link , link = imagename.link , table = FALSE, width=100, height=100)
sprotID <- gsub("^.*[[:space:]]", "\\1", rpt.df$sprot_Top_BLASTX_hit)
rpt.df$Link <- hwrite(as.character(sprotID), link = paste("http://www.uniprot.org/uniprot/", as.character(sprotID), sep = ''), table=FALSE)
rpt.df <- hwrite(rpt.df, br=TRUE, col.width=c(gene_ontology_blast='150px')) # this step should change the width of the column
 
htmlRep <- HTMLReport(shortName = "rnaseq_ntab",
                        title = "RNA-seq analysis of tobacco leaves and trichomes 09/2015-1",
                        reportDirectory = "./006_reports")
publish(rpt.df, htmlRep)
finish(htmlRep)
 

 

sessionInfo()

R version 3.2.0 (2015-04-16)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu precise (12.04.5 LTS)

locale:
 [1] LC_CTYPE=de_DE.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=de_DE.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=de_DE.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
 [1] grid      stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] hwriter_1.3.2        ReportingTools_2.8.0 knitr_1.11           cummeRbund_2.10.0    Gviz_1.12.1          rtracklayer_1.28.9   GenomicRanges_1.20.6
 [8] GenomeInfoDb_1.4.2   IRanges_2.2.7        S4Vectors_0.6.5      fastcluster_1.1.16   reshape2_1.4.1       ggplot2_1.0.1        BiocGenerics_0.14.0
[15] RSQLite_1.0.0        DBI_0.3.1           

loaded via a namespace (and not attached):
 [1] Biobase_2.28.0            edgeR_3.10.2              splines_3.2.0             R.utils_2.1.0             Formula_1.2-1             latticeExtra_0.6-26      
 [7] RBGL_1.44.0               BSgenome_1.36.3           Rsamtools_1.20.4          Category_2.34.2           lattice_0.20-33           biovizBase_1.16.0        
[13] limma_3.24.15             digest_0.6.8              RColorBrewer_1.1-2        XVector_0.8.0             colorspace_1.2-6          ggbio_1.16.1             
[19] R.oo_1.19.0               Matrix_1.2-2              plyr_1.8.3                OrganismDbi_1.10.0        GSEABase_1.30.2           DESeq2_1.8.1             
[25] XML_3.98-1.3              biomaRt_2.24.0            genefilter_1.50.0         zlibbioc_1.14.0           xtable_1.7-4              GO.db_3.1.2              
[31] scales_0.3.0              BiocParallel_1.2.20       annotate_1.46.1           PFAM.db_3.1.2             GenomicFeatures_1.20.3    nnet_7.3-11              
[37] proto_0.3-10              survival_2.38-3           magrittr_1.5              R.methodsS3_1.7.0         GGally_0.5.0              MASS_7.3-44              
[43] RcppArmadillo_0.5.400.2.0 foreign_0.8-66            GOstats_2.34.0            graph_1.46.0              tools_3.2.0               matrixStats_0.14.2       
[49] stringr_1.0.0             munsell_0.4.2             locfit_1.5-9.1            cluster_2.0.3             AnnotationDbi_1.30.1      lambda.r_1.1.7           
[55] Biostrings_2.36.4         futile.logger_1.4.1       RCurl_1.95-4.7            dichromat_2.0-0           VariantAnnotation_1.14.13 AnnotationForge_1.10.1   
[61] bitops_1.0-6              gtable_0.1.2              reshape_0.8.5             GenomicAlignments_1.4.1   gridExtra_2.0.0           Hmisc_3.16-0             
[67] futile.options_1.0.0      stringi_0.5-5             Rcpp_0.12.0               geneplotter_1.46.0        rpart_4.1-10              acepack_1.3-3.3         

reportingtools • 1.2k views
ADD COMMENT

Login before adding your answer.

Traffic: 769 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6