Package 'tastypie' reference manual (2024)

Easily create circular packing charts

Description

This function allows you to create cool circular packing charts easily by providing justthe data and a template among the available ones. Moreover, you can choose whether andwhere to display percentages and also optionally specify a title for the chart.

Usage

bubble_blow(data, template, perc = "no", title = "")

Arguments

data

A data frame (or a tibble) with two variables (columns):

  • in the first one there must be the vector of labels;

  • in the second one there must be the vector of values.
    You can use pie_datacheck to understand if the data is suitable.

template

The chosen template.
The available templates for this function are 'bub1', 'bub2', 'bub3', 'bub4', 'bub5'.

perc

You can choose among:

  • 'no' : the percentages won't be displayed (default choice);

  • 'below' : the percentages will be displayed below the group labels;

  • 'right' : the percentages will be displayed next to the group labels.

title

A string. If you want, you can specify the title of the graph.

Value

A ggplot object.In particular, this function returns a circular packing chart according to thedata, the choice of the template, and the other specifications provided.

See Also

See all the available templates displayedhere!

Examples

example <- data.frame( c("This", "Is", "Just", "An", "Example"), c(2.9, 6.9, 4.20, 13.12, 6.66))bubble_blow( data = example, template = "bub1", perc = "below", title = "Example1")example2 <- tibble::tibble( c("cat 1", "cat2", "cat3", "cat4", "cat5", "cat6", "cat7", "cat8", "cat9"), c(324, 432, 499, 291, 750, 836, 314, 133, 372))bubble_blow( data = example2, template = "bub2", perc = "right", title = "Ex2")
Add images to pie charts

Description

This function allows to easily add some figures to you pie chart, taking informationfrom the output of the pie_bake function.You can also customize the chart by specifying the colors of borders and labels, thetitle of the pie chart and where (and if) you want to print the percentagesfor each group.

Usage

pie_addimages( mypie, imglist, perc = "no", lbl_col = "black", border_col = "black", title = "")

Arguments

mypie

A ggplot object. The output from pie_bake,NOT from pie_bake_pro.
Don't focus on the template, only labels and values will be inherited.

imglist

A list of objects returned by and readJPEGused to fill slices. For optimal and fast results, we recommend the use ofsmall files (5-10 kB).

perc

You can choose among:

  • 'no' : the percentages won't be displayed (default choice);

  • 'below' : the percentages will be displayed below the group labels;

  • 'right' : the percentages will be displayed next to the group labels.

lbl_col

A string containing the chosen color for the labels, default is"black".

border_col

A string containing the chosen color for the border of the piechart, default is "black".

title

A string. If you want, you can specify the title of the graph.

Value

A ggplot object.

See Also

Please note that this function is based on the imagepiefunction.

Examples

img5 <- jpeg::readJPEG(system.file("img", "pie.jpeg", package = "tastypie"))imgs2 <- list(img5, img5, img5)df2 <- data.frame( c("A", "B", "C"), c(300, 250, 600))mypie2 <- pie_bake(df2, template = "rainbow1")pie_addimages( mypie = mypie2, imglist = imgs2, perc = "right", lbl_col = "darkcyan", border_col = "orangered", title = "Example")
Easily create pie charts

Description

This function allows you to create cool pie charts easily by providing justthe data and a template among the available ones. Moreover, you can choose whetherto display percentages or not and also optionally specify a title for the chartand a name for the categories.

Using this function you can create the classical pie charts (including the donut charts).If you are looking for something more complex and extravagant (but probably lessunderstandable), check out the pie_bake_pro function.

Usage

pie_bake(data, template, perc = FALSE, group_name = "group", title = "")

Arguments

data

A data frame (or a tibble) with two variables (columns):

  • in the first one there must be the vector of labels;

  • in the second one there must be the vector of values.

Please note that the labels are automatically sorted in alphabetical order.If you want to specify a particular order, it is recommended to type numbers orletters before the category names (e.g. "a. category1", "b. category2", ...).
You can use pie_datacheck to understand if the data is suitable.

template

The chosen template.
Type pie_template_list to display all the available ones for this function.

perc

A logical value. Should the proportions be displayed?

group_name

A string. If you want, you can specify a name for the categories.

title

A string. If you want, you can specify the title of the graph.

Value

A ggplot object.In particular, this function returns a pie (or donut) chart according to thedata, the choice of template, and the other specifications provided.

See Also

See all the available templates displayedhere!

Examples

example <- data.frame( c("a. This", "b. Is", "c. Just", "d. An", "e. Example"), c(2.9, 6.9, 4.20, 13.12, 6.66))pie_bake( data = example, template = "basic3", perc = TRUE, group_name = "groups", title = "Example1")pie_bake( data = example, template = "red1", title = "Ex2")pie_bake( data = example, template = "donut2", perc = TRUE, group_name = "CAT:")
Easily create (more complex) pie charts

Description

This function allows you to create cool pie charts easily by providing justthe data and a template among the available ones. Moreover, you can optionallyspecify a title for the chart and a name for the categories.

Using this function you can create some complex and extravagant pie charts.If you are looking for something more classical (and probably more understandable),check out the pie_bake function.

Usage

pie_bake_pro(data, template, group_name = "group", title = "")

Arguments

data

A data frame (or a tibble) with two variables (columns):

  • in the first one there must be the vector of labels;

  • in the second one there must be the vector of values.

Please note that the labels are automatically sorted in alphabetical order.If you want to specify a particular order, it is recommended to type numbers orletters before the category names (e.g. "a. category1", "b. category2", ...).
You can use pie_datacheck to understand if the data is suitable.

template

The chosen template.
Type pie_template_list_pro to display all the available ones for this function.

group_name

A string. If you want, you can specify a name for the categories.

title

A string. If you want, you can specify the title of the graph.

Value

A ggplot object (or no value if the chosen template is among the spider chart ones).In particular, this function returns a pie (or similar) chart according to thedata, the choice of template, and the other specifications provided.

See Also

See all the available templates displayedhere!

Examples

example <- data.frame( c("a. This", "b. Is", "c. Just", "d. An", "e. Example"), c(2.9, 6.9, 4.20, 13.12, 6.66))pie_bake_pro( data = example, template = "eaten3", group_name = "cat:", title = "Example1")pie_bake_pro( data = example, template = "dart1", title = "Example2!")pie_bake_pro( data = example, template = "eye5", group_name = "GROUPS:")pie_bake_pro( data = example, template = "spider2" )
Check if the data is good for making tasty pies

Description

pie_datacheck checks if the provided data are suitable for creating pie chartsusing the useful functions in the tastypie package.

Usage

pie_datacheck(data, check = FALSE)

Arguments

data

The data that you want to use for creating pie charts.

check

Logical, set equal to TRUE if you need a message to know if there areno problems.

Value

If the provided data are a dataframe with only two variables (columns) withthe vector of labels in the first one and the vector of values in the second one, nothingwill happen. Otherwise, an error that tells you what's wrong occurs.

Examples

wrong <- c(1, 2, 3)# Would return an Errorwrong2 <- data.frame("a" = c(1, 2, 3), "b" = c("ex", "am", "ple"))# Would return an Errorright <- data.frame("a" = c("ex", "am", "ple"), "b" = c(1, 2, 3))pie_datacheck(right) # No Error ==> OK!pie_datacheck(right, check = TRUE) # Positive message
Discover templates for tastypie

Description

This function allows to user to find out a random combination of templates,number of groups and features in order to get an idea of the many availableplots in the package tastypie.

Usage

pie_discover(which = c("all", "bake", "pro"))

Arguments

which

Allows to select a subset of the available templates.

If "all", the template is randomly chosen among all the available ones.
If "bake", the template is randomly chosen among the ones that can be usedthrough pie_bake.
If "pro", the template is randomly chosen among the (more complex) onesthat can be used through pie_bake_pro.

The default value is "all".

Value

A ggplot object.In particular, this function returns a pie (or similar) chart according to a randomchoice of template and the other features.

See Also

See all the available templates displayedhere!

Examples

pie_discover()pie_discover("pro")
Available templates in tastypie for pie_bake.

Description

The vector containing all the available templates for pie charts for thepie_bake function.Other more complex templates are available in pie_template_list_prothat can be used through the pie_bake_pro function.

Usage

pie_template_list

Format

An object of class character of length 30.

See Also

See all the available templates displayedhere!

Available templates in tastypie for pie_bake_pro.

Description

The vector containing all the available templates for pie charts for thepie_bake_pro function.Other less complex templates are available in pie_template_listthat can be used through the pie_bake function.

Usage

pie_template_list_pro

Format

An object of class character of length 30.

See Also

See all the available templates displayedhere!

Display an example of a particular template

Description

This function allows to user to display a pie chart by selecting the template,the number of groups of interest and whether to display the proportions or not,in order to make it easier to choose between the many templates available in thepackage tastypie.

Usage

pie_templates(template, n_groups = 4, perc = FALSE)

Arguments

template

The chosen template.

n_groups

A number from 2 to 9.

perc

A logical value. Should the proportions be displayed?
Note that if the selected template is one of those to be used withpie_bake_pro (listed in the pie_template_list_pro vector),this argument is useless.

Value

A ggplot object.In particular, this function returns a pie (or similar) chart according to thechoice of template and the other specifications provided.

See Also

See all the available templates displayedhere!

Examples

pie_templates(template = "bw1", n_groups = 3, perc = TRUE)pie_templates(template = "watermelon2", n_groups = 8)
Easy pie charts with tastypie

Description

You only need to typewhy pie charts are badon Google to find thousands of articles full of (valid) reasons why other types of chartsshould be preferred over this one.
Therefore, because of the little use due to the reasons already mentioned,making pie charts (and related) in R is not straightforward, so other functions are neededto simplify things.
In this R package there are useful functions to make tasty pie charts immediatelyby exploiting the many cool templates provided.

Author(s)

Author and Maintainer: Paolo Dalena [emailprotected]

See Also

Find more information on the package web sitehere, or on the GitHub package pagehere.

Package 'tastypie' reference manual (2024)
Top Articles
BlackPeopleMeet Overzicht Augustus 2024 - Is het een betrouwbare datingservice of nep?
Find love on an interracial gay site
Danatar Gym
Ds Cuts Saugus
Big Y Digital Coupon App
Garrick Joker'' Hastings Sentenced
Hssn Broadcasts
Oc Craiglsit
Healing Guide Dragonflight 10.2.7 Wow Warring Dueling Guide
Think Up Elar Level 5 Answer Key Pdf
Conscious Cloud Dispensary Photos
Bx11
Blackwolf Run Pro Shop
Lancasterfire Live Incidents
Loves Employee Pay Stub
2021 Volleyball Roster
R&S Auto Lockridge Iowa
Anotherdeadfairy
Understanding Gestalt Principles: Definition and Examples
The best brunch spots in Berlin
Watertown Ford Quick Lane
Motorcycle Blue Book Value Honda
Truck from Finland, used truck for sale from Finland
Abga Gestation Calculator
Indiana Jones 5 Showtimes Near Jamaica Multiplex Cinemas
Gina's Pizza Port Charlotte Fl
140000 Kilometers To Miles
Gideon Nicole Riddley Read Online Free
24 slang words teens and Gen Zers are using in 2020, and what they really mean
Marine Forecast Sandy Hook To Manasquan Inlet
Dreammarriage.com Login
Truckers Report Forums
Unity Webgl Player Drift Hunters
About Us | SEIL
Chatropolis Call Me
Trivago Myrtle Beach Hotels
Has any non-Muslim here who read the Quran and unironically ENJOYED it?
1v1.LOL Game [Unblocked] | Play Online
Taylor University Baseball Roster
WorldAccount | Data Protection
Armageddon Time Showtimes Near Cmx Daytona 12
At Home Hourly Pay
Fedex Passport Locations Near Me
[Teen Titans] Starfire In Heat - Chapter 1 - Umbrelloid - Teen Titans
412Doctors
Cleveland Save 25% - Lighthouse Immersive Studios | Buy Tickets
Arcanis Secret Santa
Ajpw Sugar Glider Worth
House For Sale On Trulia
Understanding & Applying Carroll's Pyramid of Corporate Social Responsibility
Die 10 wichtigsten Sehenswürdigkeiten in NYC, die Sie kennen sollten
The Ultimate Guide To 5 Movierulz. Com: Exploring The World Of Online Movies
Latest Posts
Article information

Author: Velia Krajcik

Last Updated:

Views: 6638

Rating: 4.3 / 5 (74 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Velia Krajcik

Birthday: 1996-07-27

Address: 520 Balistreri Mount, South Armand, OR 60528

Phone: +466880739437

Job: Future Retail Associate

Hobby: Polo, Scouting, Worldbuilding, Cosplaying, Photography, Rowing, Nordic skating

Introduction: My name is Velia Krajcik, I am a handsome, clean, lucky, gleaming, magnificent, proud, glorious person who loves writing and wants to share my knowledge and understanding with you.