selkamand / gg1d Goto Github PK
View Code? Open in Web Editor NEWAutomatically Create 1D Plots From Tabular Data
License: Other
Automatically Create 1D Plots From Tabular Data
License: Other
Just need a rebuild to show the updated marking of NA with '!' instead of zero's with '0'
underscore to space, capitalise first letter of each word. Make togglable via an option
For matching aesthetics with ggoncoplot package
should replace .
with space, just like underscores
Full error message: Error in unit(rep(0, TABLE_ROWS * dims[1]), "null") :
'x' and 'units' must have length > 0
Reproducible example
df <- structure(list(testcol = c("02", "02", "02", "02",
"02", "02", "02", "02", "02", "06", "06", "06", "06", "06", "06",
"06", "06", "06", "06", "06", "06", "06", "06", "06", "06", "06",
"06", "06", "06", "06", "06", "06", "06", "06", "06", "06", "06",
"06", "06", "06", "06", "06", "06", "06", "06", "06", "06", "06",
"06", "06", "06", "06", "06", "06", "06", "06", "06", "06", "06",
"06", "06", "06", "06", "06", "06", "06", "06", "06", "06", "06",
"06", "06", "06", "06", "06", "06", "06", "06", "06", "06", "06",
"06", "06", "06", "06", "06", "06", "06", "06", "06", "06", "06",
"06", "06", "06", "06", "06", "06", "06", "06", "06", "06", "06",
"06", "06", "06", "06", "06", "06", "06", "06", "06", "06", "06",
"06", "06", "06", "06", "06", "06", "06", "06", "06", "06", "06",
"06", "06", "06", "06", "06", "06", "06", "06", "06", "06", "06",
"06", "08", "12", "12", "12", "12", "12", "12", "12", "12", "12",
"12", "12", "12", "12", "12", "12", "12", "12", "12", "12", "12",
"12", "12", "12", "12", "12", "12", "12", "12", "12", "12", "12",
"12", "12", "12", "12", "12", "12", "12", "12", "12", "12", "12",
"12", "12", "14", "14", "14", "14", "14", "14", "14", "14", "14",
"14", "14", "14", "14", "14", "14", "14", "14", "14", "14", "14",
"14", "14", "14", "14", "14", "14", "14", "14", "14", "14", "14",
"14", "14", "14", "14", "14", "14", "14", "14", "15", "15", "16")), row.names = c(NA,
-223L), class = c("tbl_df", "tbl", "data.frame"))
gg1d_plot(df, cols_to_plot = "testcol")
#> Error in unit(rep(0, TABLE_ROWS * dims[1]), "null") :
#> 'x' and 'units' must have length > 0`
Created on 2023-03-11 with reprex v2.0.2
Should consider adding a unit test for this:
df <- data.frame(col = c(0, 0, NA, NA, NA, NA, NA, NA, 0, NA))
expect_error(gg1d_plot(df, cols_to_plot="col1"), NA)
Since theres only 1 non-na value (0) an old version of gg1d would throw an error message about breaks and labels being different lengths. We fixed the issue but should add a unit test to catch future instances
will be required for integration with ggoncoplot package
guides = "collect"
option to patchwork layout should do the trick. Should not do this by default, but should put on.
if collect_legends = TRUE
, you should also show legend titles, add a message indicating show_legend_titles
argument will be ignored
I'm thinking an _ignore sufffix
implementation could be as simple as something like
ignore_suffix_found <- grepl(x=colnames(data), pattern = "_ignore$")
data <- data[!ignore_suffix_found]
Occurs with numeric variables with NA values.
df <- data.frame(
col1 = c(0, 0, NA, NA, NA, NA, NA, NA, 0, NA)
)
Using the solution described below, instead of adding Numerical Ranges to numeric y axes we could add the feature name.
If you use ggtext to be able to differentially format our text its possible we could get small text indicating range AND larger text in the middle describing the variable name
https://stackoverflow.com/questions/52123104/ggplot2-custom-categorical-labels-on-a-numerical-x-axis
Need ncols exposed so we can set ncols=1 in ggooncoplot
Add option to control vertical spacing between plots. Should work by changing top and bottom margins before plotting
Can make configurable, and/or use some colour theory to ensure its always obvious vs the colour of the bars
Should help with ggoncoplot pathway faceting
Or at very lease, have an option to control y axis title alignment (default should be right-alignment)
add back in small ggtext rendered labels for max & min breakpoints
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.