Comments (11)
This is an elusive bug I've been chasing for a good while. I don't think it's the number of variable but the variable name itself containing an underscore. Can you send the formula string you are using?
from tangram.
Also, what version are you using? The current CRAN release or from github?
from tangram.
My formula:
table3 <- tangram(group ~ eras_score[0] + eras_teaching_check[0] + preop_carb_check[0] + preop_diet_check[0] + preop_bowel_prep_check[0] + antibiotic_check[0] + dvt_ppx_check[0] + normothermia_check[0] + regional_anesthesia_check[0] + intraop_opioid_check[0] + intraop_fluids_check[0] + intraop_min_invasive_check[0] + intraop_ng_check[0] + intraop_drains_check[0] + postop_diet_check[0] + postop_ivf_check[0] + postop_mobilization_check[0] + postop_excessdrainremoval_check[0] + postop_adjunctive_check[0] + postop_antiemetic_check[0] + preop_carb_vol_norm[1] + preadmit_check[0] + preop_acetaminophen_check[0] + regional_block_check[0] + intraop_opioids[2] + intraop_ketamine_check[0] + intraop_dextamatomadine_check[0] + intraop_lidocaine_check[0] + intraop_anxiolytic_check[0] + intraop_steroids_check[0] + intraop_nsaids_check[0] + intraop_acetaminophen_check[0] + intraop_antiemetic_check[0] + ivf_crystalloid_rate[1] + ivf_colloid_rate[1] + ivf_blood_rate[1] + intraop_ogng_temp_check[0], data=allSingle, transform=my_percent) %>% del_col(2)
I'm using the latest from Github.
from tangram.
Okay, looking at it now.
from tangram.
As a workaround rbind() works with tangram objects.
from tangram.
I can't reproduce it. I suspect you have a hidden white space character hidden in the formula based on the error output you provided having a break in it. I expanded the definition of white space to include newlines and returns and pushed that up.
Install the latest and let me know what happens. If what I think is true then it will probably fail on not being able to access a variable due to the hidden character.
> library(tangram)
> x <- "group ~ eras_score[0] + eras_teaching_check[0] + preop_carb_check[0] + preop_diet_check[0] + preop_bowel_prep_check[0] + antibiotic_check[0] + dvt_ppx_check[0] + normothermia_check[0] + regional_anesthesia_check[0] + intraop_opioid_check[0] + intraop_fluids_check[0] + intraop_min_invasive_check[0] + intraop_ng_check[0] + intraop_drains_check[0] + postop_diet_check[0] + postop_ivf_check[0] + postop_mobilization_check[0] + postop_excessdrainremoval_check[0] + postop_adjunctive_check[0] + postop_antiemetic_check[0] + preop_carb_vol_norm[1] + preadmit_check[0] + preop_acetaminophen_check[0] + regional_block_check[0] + intraop_opioids[2] + intraop_ketamine_check[0] + intraop_dextamatomadine_check[0] + intraop_lidocaine_check[0] + intraop_anxiolytic_check[0] + intraop_steroids_check[0] + intraop_nsaids_check[0] + intraop_acetaminophen_check[0] + intraop_antiemetic_check[0] + ivf_crystalloid_rate[1] + ivf_colloid_rate[1] + ivf_blood_rate[1] + intraop_ogng_temp_check[0]"
> Parser$new()$run(x)
<ASTTableFormula>
Inherits from: <ASTBranch>
Public:
clone: function (deep = FALSE)
distribute: function ()
format: character
initialize: function (left, right)
left: ASTVariable, ASTNode, R6
reduce: function (df)
right: ASTPlus, ASTBranch, ASTNode, R6
set_format: function (x)
string: function ()
terms: function ()
value: NA
from tangram.
I've looked at the input in my text editor and there are no invisible characters. I even typed out the last variable added to the formula here:
table3 <- tangram(group ~ eras_score[0] + eras_teaching_check[0] + preop_carb_check[0] + preop_diet_check[0] + preop_bowel_prep_check[0] + antibiotic_check[0] + dvt_ppx_check[0] + normothermia_check[0] + regional_anesthesia_check[0] + intraop_opioid_check[0] + intraop_fluids_check[0] + intraop_min_invasive_check[0] + intraop_ng_check[0] + intraop_drains_check[0] + postop_diet_check[0] + postop_ivf_check[0] + postop_mobilization_check[0] + postop_excessdrainremoval_check[0] + postop_adjunctive_check[0] + postop_antiemetic_check[0] + anastomosis, data=allSingle, transform=my_percent) %>% del_col(2)
and it errors out on anastomosis, which has no special characters at all. It works fine without anastomosis, but errors when it is added.
from tangram.
I found it! when calling as.character on a formula in R it's adding returns when it goes beyond a certain fixed size, i.e. it's not dependent on the width option. I added the \n and \r as ignored white space in the last patch I pushed and it seems to be working for me. I tested the patch and it solves the issue.
from tangram.
from tangram.
Sweet. Yeah, the bug was really weird because it didn't matter which variable but always seemed to error out around the 21st-24th variable. Figures it was related to something with a fixed size. Nice job!
from tangram.
I confirm. Latest github code works now on my code example!
from tangram.
Related Issues (20)
- test not matching aov() HOT 4
- test statistics? HOT 2
- Hmisc transform msd not working for intercept models. HOT 3
- Unicode output to HTML broken in current RStudio
- Tangram should handle columns with whitespaces HOT 5
- Removed from CRAN HOT 3
- README fda-example link broken HOT 2
- Label does not show in table for variable if not associated with class "labelled" attribute HOT 5
- Ability to specify specific statistical test for a particular variable HOT 2
- Style Environment "get" fails in jamovi HOT 28
- dplyr summarize loses column headers
- Mixed up response and dependant variables in spearman2() HOT 4
- Transform: N column, exclude NA values HOT 10
- Latex output, missing includes, malformed (wide) tables, numbered tables HOT 7
- fda-example.html link in README under "Quick Overview" is broken
- Transforms: can't overwrite summarize_chisq HOT 5
- multiple comparison correction support HOT 2
- Trouble adding a column HOT 3
- UTF+8 issue with rtf function, "N=" duplicated HOT 16
- Adjusting for Multiple Comparisons
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tangram.