library(knitr)
getwd()
## [1] "C:/Users/dkant/Downloads"
setwd("C:/Users/dkant/Downloads")
ginger<-read.csv("C:/Users/dkant/Downloads/Ginger1.csv")
library(ggplot2)
library(plotly)
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
fig <- ginger %>%
plot_ly(
x = ~Treatments,
y = ~No..Tillers.2MAP,
split =No..Tillers.2MAP ~Treatments,
type = 'violin',
box = list(
visible = T
),
meanline = list(
visible = T
)
)
fig <- fig %>%
layout(
xaxis = list(
title = "Fertilizers"
),
yaxis = list(
title = "Number of Tillers at 2 MAP",
zeroline = F
)
)
fig
## Warning: Ignoring 30 observations
fig <- ginger %>%
plot_ly(
x = ~Treatments,
y = ~No..Tillers.4MAP,
split =No..Tillers.4MAP ~Treatments,
type = 'violin',
box = list(
visible = T
),
meanline = list(
visible = T
)
)
fig <- fig %>%
layout(
xaxis = list(
title = "Fertilizers"
),
yaxis = list(
title = "Number of Tillers at 4 MAP",
zeroline = F
)
)
fig
## Warning: Ignoring 27 observations