Error saying Error in xy coords x y xlabel ylabel log x and y lengths differ

0 votes

I'm trying to plot my fit in R and I I get the following error:

Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ

Here is my code:

exercise <- as.factor(c(10, 10, 20, 20, 10, 10, 20, 20))
time <- c("pm", "am", "am", "pm", "am", "pm", "pm", "am")
glucose <- c(71.5, 103, 83.5, 126, 125.5, 129.5, 95, 93)

fit1 <- aov(glucose ~ exercise + time)
summary(fit1)

par(mfrow = c(2, 2))
plot(fit1)
Nov 9, 2018 in Data Analytics by Ali
• 11,360 points
7,455 views

1 answer to this question.

0 votes

Make sure is a factor

time <- as.factor(c("pm", "am", "am", "pm", "am", "pm", "pm", "am"))
answered Nov 9, 2018 by Maverick
• 10,840 points

Related Questions In Data Analytics

0 votes
0 answers

Error in xy.coords(x, y, xlabel, ylabel, log) : argument "x" is missing, with no default

Hi, my code is showing this, what's ...READ MORE

Sep 7, 2020 in Data Analytics by Nurdiana
• 120 points

recategorized Sep 7, 2020 by Gitika 1,956 views
0 votes
1 answer

How can I add x and y axis labels in ggplot2 ?

# Load a dataset(to work with) # We’ll ...READ MORE

answered May 16, 2018 in Data Analytics by zombie
• 3,790 points
1,073 views
+1 vote
0 answers
0 votes
1 answer

By using dpylr package sum of multiple columns

Basically here we are making an equation ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
2,250 views
0 votes
1 answer

How to convert a text mining termDocumentMatrix into excel or csv in R?

By assuming that all the values are ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
1,921 views
0 votes
1 answer

In a dpylr pipline how to use sample and seq?

For avoiding rowwise(), I prefer to use ...READ MORE

answered Apr 6, 2018 in Data Analytics by DeepCoder786
• 1,720 points

edited Jun 9, 2020 by Gitika 1,182 views
0 votes
1 answer

How to create a list of Data frames?

Basically all we have to do is ...READ MORE

answered Apr 9, 2018 in Data Analytics by DeepCoder786
• 1,720 points
1,342 views
0 votes
1 answer

Error saying "Error in lag(x, 1) : unused argument (1)"

lag only works as expected with time-series ...READ MORE

answered Nov 16, 2018 in Data Analytics by Maverick
• 10,840 points
1,693 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP