Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Convert the following RStudio code into Jupyter-Python code: A worked example of One-way Analysis of Variance > oneway View(oneway) > attach(oneway) > names(oneway) [1] Growth

Convert the following RStudio code into Jupyter-Python code:

A worked example of One-way Analysis of Variance

> oneway <- read.csv("/Course Downloadable Data Exercises-20190120/oneway.txt")

> View(oneway)

> attach(oneway)

> names(oneway)

[1] "Growth" "Photoperiod"

> tapply(Growth,Photoperiod,mean)

Long Short Very.long Very.short

2.500000 2.166667 3.166667 1.666667

> Photoperiod<-ordered(Photoperiod,levels=c("Very.short","Short","Long","Very.long"))

> tapply(Growth,Photoperiod,mean)

Very.short Short Long Very.long

1.666667 2.166667 2.500000 3.166667

> is.factor(Photoperiod)

[1] TRUE

> one.way<-aov(Growth~Photoperiod)

> summary(oneway)

Growth Photoperiod

Min. :1.000 Long :6

1st Qu.:1.750 Short :6

Median :2.000 Very.long :6

Mean :2.375 Very.short:6

3rd Qu.:3.000

Max. :6.000

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions