Comments (2)
Please check that you have version 0.8.1. There was an issue with 0.8.0, that might be it.
If you have 0.8.1, please paste the call to dfSummary, with a brief description of your data. Thx
from summarytools.
I am also having this issue, in summarytools version 0.8.5. In my case, the issue seems to be that I am piping a dataframe through to dfSummary
, and because of that the data_info$Dataframe
attribute is NULL
and doesn't get added to the title. The issue doesn't occur when not using a pipe, as shown in the reprex below.
I think this can be addressed by updating the if ("Dataframe" %in% names(data_info))
check in the print method to check for NULL
, I'll send a PR through shortly.
Reprex:
library(tidyverse)
library(summarytools)
data("iris")
summ1 = dfSummary(iris)
data_info1 = attr(summ1, "data_info")
data_info1
#> $Dataframe
#> [1] "iris"
#>
#> $N.obs
#> [1] 150
print(summ1)
#> Data Frame Summary
#> iris
#> N: 150
#> ------------------------------------------------------------------------------------------------------------------------
#> No Variable Stats / Values Freqs (% of Valid) Text Graph Valid Missing
#> ---- --------------- -------------------------- -------------------- -------------------------------- -------- ---------
#> 1 Sepal.Length mean (sd) : 5.84 (0.83) 35 distinct val. . . : : 150 0
#> [numeric] min < med < max : : : : : (100%) (0%)
#> 4.3 < 5.8 < 7.9 : : : : :
#> IQR (CV) : 1.3 (0.14) : : : : :
#> : : : : : : : :
#>
#> 2 Sepal.Width mean (sd) : 3.06 (0.44) 23 distinct val. : 150 0
#> [numeric] min < med < max : : (100%) (0%)
#> 2 < 3 < 4.4 . :
#> IQR (CV) : 0.5 (0.14) : : : :
#> . . : : : : : :
#>
#> 3 Petal.Length mean (sd) : 3.76 (1.77) 43 distinct val. : 150 0
#> [numeric] min < med < max : : . : (100%) (0%)
#> 1 < 4.35 < 6.9 : : : .
#> IQR (CV) : 3.5 (0.47) : : : : : .
#> : : . : : : : : .
#>
#> 4 Petal.Width mean (sd) : 1.2 (0.76) 22 distinct val. : 150 0
#> [numeric] min < med < max : : (100%) (0%)
#> 0.1 < 1.3 < 2.5 : . . :
#> IQR (CV) : 1.5 (0.64) : : : : .
#> : : : : : . : : :
#>
#> 5 Species 1. setosa 50 (33.3%) IIIIIIIIIIIIIIII 150 0
#> [factor] 2. versicolor 50 (33.3%) IIIIIIIIIIIIIIII (100%) (0%)
#> 3. virginica 50 (33.3%) IIIIIIIIIIIIIIII
#> ------------------------------------------------------------------------------------------------------------------------
summ2 = iris %>%
select(- Petal.Length) %>%
dfSummary()
data_info2 = attr(summ2, "data_info")
data_info2
#> $Dataframe
#> NULL
#>
#> $N.obs
#> [1] 150
print(summ2)
#> Error in sect_title[[2]]: subscript out of bounds
from summarytools.
Related Issues (20)
- Bug: `print.summarytools` fails printing when `method="pander"`
- Do not check grouped_df by callstack in ctable
- Specify how to order rows in a ctable()
- prettyNum error HOT 3
- Width of dfSummary output in html HOT 3
- printr package causes 2 graphs in dfSummary() rendered output
- dfSummary: histogram x-axis tick mark labels? HOT 1
- dfSummary: box plots for numeric variables? HOT 1
- Installing in Azure Synapse + SparkR: Error "fatal error: Magick++.h: No such file or directory compilation terminated." HOT 1
- Security: update jQuery to >=3.6.0 HOT 2
- Change of results when using tb() in grouped freq() HOT 3
- Bug in print generic implementation for list HOT 1
- [Feature request] dfSummary() with docx HOT 1
- UTF-8/odd character handling causes header headaches HOT 3
- Dependency on TCL/Tk breaks Docker/headless mode
- Group Index Does Not Print When Applying stby Through a Function on a List of Data Frames
- error when using dfSummary with shiny
- Fisher's exact test in ctable()?
- Getting incorrect results when using stby and descr with weights HOT 1
- Absolute max for dfSummary? Error when max.distinct.values>220
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 summarytools.