knitr::opts_chunk$set(echo = TRUE)

This document is intended for our own use to reflect on our experience during the project and to document certain things; for e.g. - the discussions during the meetings with our Supervisor: Uli Niemann, learning notes, bugs we encountered and references to the resources we used etc.

Explored Sources:

  1. Extending ggplot2 https://ggplot2.tidyverse.org/articles/extending-ggplot2.html#creating-a-new-geom-1 gives - Introduction to ggproto system of object oriented programming and how to extend ggplot 2. This OO system is used only in one place: ggplot2.

All ggplot2 objects are built using the ggproto system of object oriented programming.

Important points: + layer() takes care of teasing the different parameters apart and making sure they’re stored in the right place + + +

Warning Message : summarise() regrouping output by '.phase', '.cluster' (override with .groups argument)

Resource referred to : https://stackoverflow.com/questions/62140483/how-to-interpret-dplyr-message-summarise-regrouping-output-by-x-override

Debugging

  1. options(error = recover) # allows us to go and see the state of the function (advantage over traceback)

  2. select the frame you want to examine

  3. then type : ls() to see the object that exists

  4. examine the object : you can use class(), actually print the object,

possible problems

for submitting to CRAN , you are only allowed ASCII characters in your R files.

The most common offenders are “curly” or “smart” single and double quotes that sneak in through copy/paste. The functions tools::showNonASCII() and

tools::showNonASCIIfile(file) help you find the offending file(s) and line(s).

# install.packages("png")
# install.packages("hexSticker")
library(hexSticker)
library(png)

img_path <- "D:/KMD Project 2020/tp-radial-barchart/outline/radial-barchart.png"
img <- readPNG(img_path)
sticker(img, package="hexSticker", p_size=20, s_x=1, s_y=.75, s_width=.6,
        filename= "radial-barchart.png")
# not completed yet
# for stackoverflow and rstudio community()
tidy_data %>% 
  head(n = 100) %>% 
data <-tibble::tribble(
               ~.id, ~.phase, ~.cluster,        ~feature,              ~value, ~.gr_id,      ~.gr_name,
              1174L,    "T0",      "C1",        "safety",   -1.14539726690454,     10L,  "description",
              1174L,    "T0",      "C1",       "analyst",   -1.13474594467467,      6L,   "obligation",
              1174L,    "T0",      "C1",        "region",  -0.804691876086546,      5L, "significance",
              1174L,    "T0",      "C1",      "instance",   -1.11760326295456,      5L, "significance",
              1174L,    "T0",      "C1",        "county",  -0.547123310759659,      5L, "significance",
              1174L,    "T0",      "C1",          "math",  -0.817947570273842,      5L, "significance",
              1174L,    "T0",      "C1",       "penalty",   -1.02297579384915,      5L, "significance",
              1174L,    "T0",      "C1",         "skill",   0.639672760309734,      6L,   "obligation",
              1174L,    "T0",      "C1",          "desk",  -0.745018157691649,      6L,   "obligation",
              1174L,    "T0",      "C1",     "inflation",  0.0365409587276919,      6L,   "obligation",
              1174L,    "T0",      "C1",    "connection",  -0.830711634667604,      6L,   "obligation",
              1174L,    "T0",      "C1",        "member",  -0.496130106846445,      6L,   "obligation",
              1174L,    "T0",      "C1",      "stranger",  -0.584101137194349,      6L,   "obligation",
              1174L,    "T0",      "C1",        "aspect",  -0.961524539475782,      6L,   "obligation",
              1174L,    "T0",      "C1",     "direction",  -0.448736406346835,      6L,   "obligation",
              1174L,    "T0",      "C1",     "procedure",  -0.923869286979399,      6L,   "obligation",
              1174L,    "T0",      "C1",          "poem",  -0.661825697498239,      6L,   "obligation",
              1174L,    "T0",      "C1",       "mixture",  -0.806530413835083,      6L,   "obligation",
              1174L,    "T0",      "C1",    "psychology",  -0.758487048585149,      6L,   "obligation",
              1174L,    "T0",      "C1",     "cigarette",   -1.01060729081441,      6L,   "obligation",
              1174L,    "T0",      "C1",     "marketing",  -0.697535498014765,      6L,   "obligation",
              1174L,    "T0",      "C1",       "storage",  -0.323398493582095,      6L,   "obligation",
              1174L,    "T0",      "C1",       "garbage",   0.196337788952126,      9L,        "truth",
              1174L,    "T0",      "C1",           "lab",    -1.3400226545909,      9L,        "truth",
              1174L,    "T0",      "C1",           "mom",  -0.813513641370092,      9L,        "truth",
              1174L,    "T0",      "C1",    "assumption",   -1.01061990097029,      9L,        "truth",
              1174L,    "T0",      "C1",          "oven",  -0.479962019867914,      9L,        "truth",
              1174L,    "T0",      "C1",       "vehicle",   -0.35424092334285,      4L,   "preference",
              1174L,    "T0",      "C1",       "meaning",  -0.125263775625168,      4L,   "preference",
              1174L,    "T0",      "C1",       "outcome",   -1.20743664787754,      4L,   "preference",
              1174L,    "T0",      "C1",       "alcohol",  -0.443361694623342,     10L,  "description",
              1174L,    "T0",      "C1",      "director",  -0.674100235256021,     10L,  "description",
              1174L,    "T0",      "C1",          "soup",  -0.617182124355118,      3L,  "engineering",
              1174L,    "T0",      "C1", "establishment",   -1.07190785573453,      3L,  "engineering",
              1174L,    "T0",      "C1",     "historian",   -1.03255325886449,      3L,  "engineering",
              1174L,    "T0",      "C1",    "reflection",    -0.4142221239633,     10L,  "description",
              1174L,    "T0",      "C1",   "competition",   -1.00501055374799,      3L,  "engineering",
              1174L,    "T0",      "C1",           "hat",   -1.01228946540165,     10L,  "description",
              1174L,    "T0",      "C1",      "painting",  0.0454326945409483,     10L,  "description",
              1174L,    "T0",      "C1",      "software",    1.04168954084305,      1L,     "audience",
              1174L,    "T0",      "C1",        "effort",    1.00293615162899,      1L,     "audience",
              1174L,    "T0",      "C1",      "contract",  -0.320244839542862,      1L,     "audience",
              1174L,    "T0",      "C1",       "reading",   0.589545182320285,      1L,     "audience",
              1174L,    "T0",      "C1",    "inspection",   -1.05019895884535,      1L,     "audience",
              1174L,    "T0",      "C1",          "goal",   0.220682630654364,      1L,     "audience",
              1174L,    "T0",      "C1",   "improvement", -0.0737544718813583,      1L,     "audience",
              1174L,    "T0",      "C1",           "dad",    1.32328865246647,      1L,     "audience",
              1174L,    "T0",      "C1",      "birthday",   0.616665803972651,      1L,     "audience",
              1174L,    "T0",      "C1",      "teaching",  -0.777562852840058,      1L,     "audience",
              1174L,    "T0",      "C1",      "weakness",  -0.302554447852207,      1L,     "audience",
              1174L,    "T0",      "C1",       "physics",    1.18225077585186,      2L,     "location",
              1174L,    "T0",      "C1",          "army",    1.52079220848125,      4L,   "preference",
              1174L,    "T0",      "C1",      "resource",   0.503294052487747,      4L,   "preference",
              1174L,    "T0",      "C1",          "meat",   0.265574589076175,      4L,   "preference",
              1174L,    "T0",      "C1",     "committee",  -0.310411698370299,      8L,     "hospital",
              1174L,    "T0",      "C1",    "indication",   -1.56338900901577,      8L,     "hospital",
              1174L,    "T0",      "C1",         "entry",   -1.03200316877416,      8L,     "hospital",
              1174L,    "T0",      "C1",          "debt",   0.684776108990478,      2L,     "location",
              1174L,    "T0",      "C1",         "river",   0.533446838861798,      2L,     "location",
              1174L,    "T0",      "C1",         "bonus",   0.421010039484202,      2L,     "location",
              1174L,    "T0",      "C1",    "membership",  -0.615272714109197,      2L,     "location",
              1174L,    "T0",      "C1",          "song",  -0.427724668333884,      2L,     "location",
              1174L,    "T0",      "C1",        "tennis",    1.44606589374638,      2L,     "location",
              1174L,    "T0",      "C1",        "nature",  -0.566631137028189,      2L,     "location",
              1174L,    "T0",      "C1",         "union",  -0.325096858984599,      2L,     "location",
              1174L,    "T0",      "C1",      "judgment",  -0.190916709478907,      2L,     "location",
              1174L,    "T0",      "C1",          "poet",  -0.609007507930549,      2L,     "location",
              1174L,    "T0",      "C1",    "possession",    1.07132529219486,      2L,     "location",
              1174L,    "T0",      "C1",        "church",  0.0332347621698749,      7L,    "economics",
              1174L,    "T0",      "C1",   "measurement",  -0.738679225933104,      7L,    "economics",
              1174L,    "T0",      "C1",        "office", -0.0422148669118736,      7L,    "economics",
              1174L,    "T0",      "C1",        "injury",  -0.299512518857604,      7L,    "economics",
              1174L,    "T0",      "C1",         "buyer",    1.39704265814642,      7L,    "economics",
              1174L,    "T0",      "C1",  "relationship",  -0.504499712805351,      7L,    "economics",
              1174L,    "T0",      "C1",   "advertising",  -0.893980029439351,      7L,    "economics",
              1174L,    "T0",      "C1",      "property",   0.442638939805965,      7L,    "economics",
               778L,    "T1",      "C2",        "safety",  -0.402063434285255,     10L,  "description",
               778L,    "T1",      "C2",       "analyst",   0.703279555315543,      6L,   "obligation",
               778L,    "T1",      "C2",   "recognition",   0.107384959929665,      1L,     "audience",
               778L,    "T1",      "C2",        "region",  0.0545159691296391,      5L, "significance",
               778L,    "T1",      "C2",      "instance",    1.76071772771746,      5L, "significance",
               778L,    "T1",      "C2",        "county",   0.776215528378639,      5L, "significance",
               778L,    "T1",      "C2",          "math",   0.643137947540325,      5L, "significance",
               778L,    "T1",      "C2",       "penalty",    1.09269719707092,      5L, "significance",
               778L,    "T1",      "C2",         "skill",  -0.449539612660066,      6L,   "obligation",
               778L,    "T1",      "C2",          "desk",    1.17904957469529,      6L,   "obligation",
               778L,    "T1",      "C2",     "inflation",  -0.816209625475393,      6L,   "obligation",
               778L,    "T1",      "C2",    "connection",    1.34692618481416,      6L,   "obligation",
               778L,    "T1",      "C2",        "member",     1.8503668464945,      6L,   "obligation",
               778L,    "T1",      "C2",      "stranger",  -0.584101137194349,      6L,   "obligation",
               778L,    "T1",      "C2",        "aspect",    0.80178478125496,      6L,   "obligation",
               778L,    "T1",      "C2",     "direction",   0.930316286848249,      6L,   "obligation",
               778L,    "T1",      "C2",     "procedure",    1.41725921474749,      6L,   "obligation",
               778L,    "T1",      "C2",          "poem",    1.77819797991905,      6L,   "obligation",
               778L,    "T1",      "C2",       "mixture",  -0.806530413835083,      6L,   "obligation",
               778L,    "T1",      "C2",    "psychology",  -0.758487048585149,      6L,   "obligation",
               778L,    "T1",      "C2",     "cigarette",   0.805665169995662,      6L,   "obligation",
               778L,    "T1",      "C2",     "marketing",    1.49236707328389,      6L,   "obligation",
               778L,    "T1",      "C2",       "storage",    3.09076560294888,      6L,   "obligation",
               778L,    "T1",      "C2",       "garbage",    0.80842419850376,      9L,        "truth"
              )


Ashish-Soni08/ggradialbar documentation built on April 15, 2021, 4:11 a.m.