Skip to content

Instantly share code, notes, and snippets.

print(d$name)
d <- Dog$new(name = "Milo", age = 4, hair_color = "black")
print(d)
Dog <- R6Class(
classname = "Dog",
public = list(
name = NULL,
age = NULL,
hair_color = NULL,
initialize = function(name = NA, age = NA, hair_color = NA) {
self$name = name
self$age = age
self$hair_color = hair_color
d <- Dog$new(name = "Milo", age = 4, hair_color = "black")
print(d)
d <- Dog$new()
print(d)
library(R6)
Dog <- R6Class(
classname = "Dog",
public = list(
name = NULL,
age = NULL,
hair_color = NULL
)
)
grapesAgri1::descApp() # descriptive Statistics and Visualization
grapesAgri1::corrApp() # Correlation Analysis
grapesAgri1::ttApp() # Compare Means
grapesAgri1::crdApp() # Completely Randomized Design
grapesAgri1::layoutApp() # Field layout of experiments
grapesAgri1::rbdApp() # Randomized Block Design
install.packages('grapesAgri1', dependencies=TRUE)
ggplot(data, aes(x = quarter, y = profit, fill = product)) +
geom_col(position = position_dodge()) +
scale_fill_manual(values = c("#3db5ff", "#0099f9")) +
geom_text(aes(label = profit), position = position_dodge(0.9), vjust = 2, size = 4, color = "#ffffff") +
geom_hline(yintercept = mean(data$profit), linetype = "dashed", size = 1)
ggplot(data, aes(x = quarter, y = profit, fill = product)) +
geom_col(position = position_dodge()) +
scale_fill_manual(values = c("#3db5ff", "#0099f9")) +
geom_text(aes(label = profit), position = position_dodge(0.9), vjust = 2, size = 4, color = "#ffffff")