groupedstats | Grouped statistical analysis in a tidy way | Analytics library
kandi X-RAY | groupedstats Summary
kandi X-RAY | groupedstats Summary
groupedstats package provides a collection of functions to run statistical operations on multiple variables across multiple grouping variables in a dataframe. This is a common situation, as illustrated by few example cases-.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of groupedstats
groupedstats Key Features
groupedstats Examples and Code Snippets
# for reproducibility
set.seed(123)
options(tibble.width = Inf) # show me all columns
groupedstats::grouped_wilcox(
data = iris_long,
dep.vars = value, # dependent variable
indep.vars = part, # independent variable
grouping.vars = c(Species,
# for reproducibility
set.seed(123)
library(datasets)
options(tibble.width = Inf) # show me all columns
# note that this dataset has NAs
groupedstats::grouped_summary(
data = ggplot2::msleep,
grouping.vars = vore,
measures = sleep_total:awake,
# for reproducibility
set.seed(123)
library(gapminder)
options(tibble.width = Inf) # show me all columns
groupedstats::grouped_slr(
data = gapminder::gapminder,
dep.vars = c(lifeExp, pop),
indep.vars = c(gdpPercap, gdpPercap),
grouping.vars
Community Discussions
Trending Discussions on groupedstats
QUESTION
In R
packages, there is a possibility of reexporting functions. This makes it easy to recycle the same function without having to repeat the code across different packages.
For example, devtools::session_info
function is a reexport of sessioninfo::session_info
:
ANSWER
Answered 2020-Feb-04 at 21:37Data is searched for in a loaded package in a different fashion from the namespace for functions, so it's not technically an export. But you can re-export another package's dataset, which will operate in the same way with one exception: it will not be found using the data()
function, which just searches the data/
directory for data objects. The example below:
will work as if it were a "lazy loaded" dataset, e.g. myiris
if your package is attached, or using yourpackage::myiris
;
will not work with data(myiris, package = "yourpackage")
.
QUESTION
I have written the ggstatsplot
package to carry out some statistical analysis. The package functions (in the development version) can either return a plot
or a call
that contains statistical details displayed in the subtitle of the plot.
Here is an example of a plot
as a return:
ANSWER
Answered 2019-Jun-13 at 16:16It is pretty easy to convert your example to Markdown code. This is nowhere near general, but it is kind of obvious how to extend it to handle other expressions.
The idea is to evaluate the plotmath
expression to form a string that is Markdown. For example, use this function:
QUESTION
I am trying to figure out if I can use the list
of arguments provided to purrr::pmap()
to also name the elements of the output list from this function using purrr::set_names()
.
For example, here is a simple example where I am using pmap
to create summary for some variables from different dataframes across grouping variables.
ANSWER
Answered 2018-Nov-02 at 06:46From tidyverse
package, you can also use lst
function. lst
is used for creating list. It is like tibble
function to create tibble but for creating list. One of the difference with base list()
is that it automatically names the list.
It is in dplyr, exported from tibble.
For the example, I also replace base alist
by rlang::exprs
as it is equivalent. Indeed, both are ok.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install groupedstats
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page