Code Monkey home page Code Monkey logo

lineup_htmlwidget's Issues

Adding Factor Variable with Single Level Breaks in Shiny

I'm creating a Shiny app where users can filter their data and I display it in your lineup table (Thanks for making it!). Unfortunately, if the user wants to filter one of the factor variables to single level, that column and any column to the right in the table does not show up. Below I have an example where new_var is a factor with a single level and thus, the entire table doesn't show up. I think this is a bug since I didn't find anything in the help files about this.

library(shiny)
library(lineupjs)
library(dplyr)

ui <- fluidPage(
  fluidRow(
    lineupOutput("lineup1")
  )
)

server <- function(input, output) {
  output$lineup1 <- renderLineup({
    temp1 = iris %>% mutate(new_var = "test") # works because it's a character
    temp2 = iris %>% mutate(new_var = as.factor("test")) # does not work
    temp3 = iris %>% filter(Species == 'virginica') # works - don't know why it does but temp2 doesn't
   
    lineup(temp2, width = "100%")
  })
}

# Run the application
shinyApp(ui = ui, server = server)

Conflicts with shinyWidgets

Hi!

I'm trying to use your package in my shiny application and found that it doesn't seem to display data when any command from shinyWidgets is invoked. I've tried updating to the latest versions of both packages but that doesn't seem to work.

As an example:

library(shiny)
library(lineupjs)

ui <- fluidPage(
  sidebarLayout(
    
    sidebarPanel(
      shinyWidgets::awesomeRadio(
        inputId = "data_file_type",
        label = 'Select data type.',
        choices = c('Example Data' = "example_data",
                    'Upload Data'  = "upload_data"),
        inline = FALSE, status = "primary")
    ),
    
    mainPanel(
      lineupOutput("lineup1")
    )
    
  )
    
)

server <- function(input, output) {
  
  output$lineup1 <- renderLineup({
    if (input$data_file_type == 'example_data'){
      lineup(iris, options=list(rowHeight=20))
      
    } else {
      return(NULL)
      
    }
  })
  
}

shinyApp(ui = ui, server = server)

Internationalisation

We want to use your lineup_htmlwidget with R shiny for a project in Brazil.
We need to localize the Panel and Filter strings to portugues.
is this possible?

Hierarchical Sorting - Not Working

I'm only able to sort on a single column; this is true both on the sidebar and the columns themselves (see image)

BTW this is a fantastic contribution, so thanks!

image

image

LineUpJS files not found in htmlwidgets/dist

Hi,

I'm sorry if I'm missing something obvious, but how is the LineUpJS library supposed to get into htmlwidgets/dist?
When I install the package from local source and use it for my visualizations, I'm getting Error: path for html_dependency not found: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/lineupjs/htmlwidgets/dist

Here is my R version info

platform       aarch64-apple-darwin20      
arch           aarch64                     
os             darwin20                    
system         aarch64, darwin20           
status                                     
major          4                           
minor          2.1                         
year           2022                        
month          06                          
day            23                          
svn rev        82513                       
language       R                           
version.string R version 4.2.1 (2022-06-23)
nickname       Funny-Looking Kid

Thanks!

widget is not working in knitted HTML document (or anywhere else)

Using the widget (lineupjs_3.1.0) in an RMarkdown document results in empty vertical space but nothing else. I tried both Chrome (Version 67.0.3396.99 (Official Build) (64-bit)) and the HTML viewer built into RStudio (Version 1.1.442, Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8). Nothing shows up in the browser console.

---
title: "LineUp Test"
output: html_document
---

\```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(lineupjs)
\```

\```{r}
lineup(iris)
\```

Some info on versions:

> R.Version()
$platform
[1] "x86_64-apple-darwin15.6.0"

$arch
[1] "x86_64"

$os
[1] "darwin15.6.0"

$system
[1] "x86_64, darwin15.6.0"

$status
[1] ""

$major
[1] "3"

$minor
[1] "4.1"

$year
[1] "2017"

$month
[1] "06"

$day
[1] "30"

$`svn rev`
[1] "72865"

$language
[1] "R"

$version.string
[1] "R version 3.4.1 (2017-06-30)"

$nickname
[1] "Single Candle"
R version 3.4.1 (2017-06-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] lineupjs_3.1.0  jsonlite_1.5    reshape2_1.4.3  forcats_0.3.0   stringr_1.3.0  
 [6] dplyr_0.7.4     purrr_0.2.4     readr_1.1.1     tidyr_0.8.0     tibble_1.4.2   
[11] ggplot2_2.2.1   tidyverse_1.2.1

loaded via a namespace (and not attached):
 [1] tidyselect_0.2.4 haven_1.1.0      lattice_0.20-35  colorspace_1.3-2 htmltools_0.3.6 
 [6] yaml_2.2.0       rlang_0.2.0      pillar_1.2.1     foreign_0.8-69   glue_1.2.0      
[11] modelr_0.1.1     readxl_1.0.0     bindrcpp_0.2.2   bindr_0.1.1      plyr_1.8.4      
[16] munsell_0.4.3    gtable_0.2.0     cellranger_1.1.0 rvest_0.3.2      htmlwidgets_1.2 
[21] psych_1.7.8      evaluate_0.10.1  knitr_1.17       httpuv_1.3.5     crosstalk_1.0.0 
[26] parallel_3.4.1   broom_0.4.2      Rcpp_0.12.16     xtable_1.8-2     scales_0.5.0    
[31] backports_1.1.1  mime_0.5         mnormt_1.5-5     hms_0.3          digest_0.6.15   
[36] stringi_1.1.7    shiny_1.0.5      grid_3.4.1       rprojroot_1.2    cli_1.0.0       
[41] tools_3.4.1      magrittr_1.5     lazyeval_0.2.1   crayon_1.3.4     pkgconfig_2.0.1 
[46] xml2_1.1.1       lubridate_1.7.3  assertthat_0.2.0 rmarkdown_1.6    httr_1.3.1      
[51] rstudioapi_0.7   R6_2.2.2         nlme_3.1-131     compiler_3.4.1  

unsupported browser detected

Hello Samuel Gratzl,
I am very interested in lineup_htmlwidget -- thank you!
But when I tried to use it I've got an error:
unsupported browser detected
use the ignoreUnsupportedBrowser=true option to ignore this error at your own risk

I used this options -- lineup(iris, options = c(list(ignoreUnsupportedBrowser = TRUE))) -- but nothing happened.

my sessionInfo is:
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000)

Matrix products: default

locale:
[1] LC_COLLATE=Russian_Russia.utf8 LC_CTYPE=Russian_Russia.utf8
[3] LC_MONETARY=Russian_Russia.utf8 LC_NUMERIC=C
[5] LC_TIME=Russian_Russia.utf8

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

other attached packages:
[1] lineupjs_4.3.0 BiocManager_1.30.18

loaded via a namespace (and not attached):
[1] Rcpp_1.0.9.1 pillar_1.8.1 compiler_4.2.1
[4] later_1.3.0 tools_4.2.1 digest_0.6.29
[7] jsonlite_1.8.0 lifecycle_1.0.2 tibble_3.1.8
[10] gtable_0.3.1 pkgconfig_2.0.3 rlang_1.0.5
[13] shiny_1.7.2 cli_3.3.0 rstudioapi_0.14
[16] crosstalk_1.2.0 yaml_2.3.5 fastmap_1.1.0
[19] dplyr_1.0.99.9000 generics_0.1.3 vctrs_0.4.1.9000
[22] htmlwidgets_1.5.4 grid_4.2.1 tidyselect_1.1.2.9000
[25] glue_1.6.2 R6_2.5.1 fansi_1.0.3
[28] ggplot2_3.3.6.9000 magrittr_2.0.3 scales_1.2.1
[31] promises_1.2.0.1 htmltools_0.5.3 ellipsis_0.3.2
[34] mime_0.12 colorspace_2.0-3 xtable_1.8-4
[37] httpuv_1.6.5 utf8_1.2.2 munsell_0.5.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.