Analysis my data vs. library data

I am trying to analyze plant breeding data according to a template from a pdf file of plant breeding. The problem I face is R performs the analysis according to the library data ( data of pdf), but not my real data in spite of bringing my data to the R studio as .xlsx form. The following example I did it about North Carolina1. I put my file name (sample) instead of the original file name (northcarolina1), this is the only change I have made:

> sample <- read_excel("C:/Users/x9-999/Desktop/sample.xlsx")
> View(sample)
> data(sample)
Warning message:
In data(sample) : data set ‘sample’ not found
# using general linear model
p1 <- carolina1(dataframe = northcaro1, set = "set", male = "male", female = "female", 
progeny = "progeny", replication = "replication", yvar = "yield")

anova(p1[[1]]) # anova 

p1[[1]]$coefficients  ## coefficients  

p1$var.m # male variance 
p1$ var.f # femal variance 
p1$ var.A # variance additive 
p1$ var.D # variance dominance

Most likely this is because you are still using the built-in dataset instead of your real data, you have to change the dataframe parameter to your own data i.e dataframe = sample

Also, please try to make your questions with a self-contained REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.

If you've never heard of a reprex before, you might want to start by reading this FAQ:

Dear andresrcs
I already changed the dataframe parameter from northcarolina1 To sample, but I got same fault. In fact I have no idea about reprex, I will try to investigate it. Thanks.

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.