Object not found despite appearing in header and summary

I am having trouble getting an ANOVA done because the variables from a table I want to analyze are not found by the program. I would check spelling again, but in this case it is a three letter name, so I guess at least I know that is not the problem. The table seems to be properly loaded and everything appears in the summary, so not sure what mistake I am making. My code is:

data2 <- read.csv("Species_measurement_merged2.csv", header = TRUE, sep=";", dec=",")
summary(data2)
one.way <- aov(Art ~ WaterPot_Dawn, data2 = data)

Thanks for the help!

Typo?

data=data2

I am afraid I don't undertand you. Did I make a typo in my code? My dataframe is called data2, so I thought the aov line had to include it as "data2=data" in order to point out what is my dataframe for my analysis. Should it be written differently?

Parameter assignment works by the function defined parameter name on the left side of = and the user chosen value to pass on the right side.

So you had the order wrong.

I see. Thanks for the help! Unfortunately, I am still quite stuck. Since I get another error after changing the line.

one.way <- aov(Art ~ WaterPot_Dawn, data = data2) #NAs introduced by coercion
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
NA/NaN/Inf in 'y'
In addition: Warning message:
In storage.mode(v) <- "double" : NAs introduced by coercion

Any idea on what could be causing this? I have tried with having NA and "-" to represent NA values, but neither seem to work. Should I create a new thread for this problem? Thank you.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.