knitr-knit_print

Here are the examples of the r api knitr-knit_print taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

19 File: print.R, author: r-spatial, license: GNU General Public License v3.0

 knit_print.mapview = function(x, ...) { 

     knitr::knit_print(mapview2leaflet(x), ...) 

 } 

 lemon_print.table  < - function(x, options, ...) { 

     if (is.null(dimnames(x)))  

         return(knitr::knit_print(unclass(x), options, ...)) 

     if (!is.null(names(dimnames(x))) & all(names(dimnames(x)) ==  

         ""))  

         return(knitr::knit_print(unclass(x), options, ...)) 

     if (length(dim(x)) == 2 & all(dimnames(x)[[1]] == "") & all(dimnames(x)[[2]] !=  

         "")) { 

         l  < - grepl("NA's[ ]+:[[:digit:]]+", x) 

         x[l]  < - gsub("NA's", "`NA`s", x[l], fixed = TRUE) 

         x[is.na(x)]  < - " " 

         options$kable.opts  < - merge.list(options$kable.opts,  

             list(row.names = FALSE, align = "l")) 

         lemon_print.data.frame(x, options, ...) 

     } 

     else { 

         knitr::knit_print(unclass(x), options, ...) 

     } 

 } 

Categories r Tags