R Beginner: running into problems with R using my imported data for anaylsis

I am following code from an example using GerminaR, which uses the prosopis data set already in R. I changed the code for my own data set. My data loads no problem, but when I try to do the germination analysis it uses the prosopis data. I am not sure what my error in the code is for this to occur. Any advice on how to fix this?


This image shows R using the prosopis data instead of mine to produce the germination summary table. Using the code to load the dataset, I had no issues with the table being created, but it will not use my data for the analysis.

Here is the original code.

# Install packages and dependencies

library(GerminaR)
library(dplyr)

# load data

fb <- prosopis %>% 
   dplyr::mutate(across(c(nacl, temp, rep), as.factor))

# Prosopis data set

fb %>% 
   head(10) %>% 
   kable(caption = "Prosopis dataset loaded")
# germination analysis (ten variables)

gsm <- ger_summary(SeedN = "seeds"
                   , evalName = "D"
                   , data = fb
                   )

# Prosopis data set processed

gsm %>% 
   head(10) %>% 
   kable(caption = "Function ger_summary performe ten germination indices")

Hi, in this bit, does fb refer to your own dataset?

1 Like

Yes, fb refers to my own dataset. They used fb in the example, and I have tried changing it to other words and made no difference in the outcome.

That seems strange. Can you show the code where your dataset is loaded and where you have called the object fb?

The screenshot shows my data is loaded, but when I go to do the analysis it does not use my data.

Here is the code I used.

# Install packages and dependencies

library(GerminaR)
library(dplyr)

# load data

fb <- StiffGoldenrod_Data %>% 
  dplyr::mutate(across(c(Temp, Rep), as.factor))

# data set

fb %>% 
  head(288) %>% 
  kable(caption = "Stiff Goldenrod dataset loaded")

This may sound like a silly question, but where did you load in the StiffGoldenRod_Data?

1 Like

Also, when you get to this bit, the StiffGoldenRod_Data in the screenshot shows that the column is called Seeds rather than seeds. Does that cause an error? Is there an issue with Temp being some sort of character column as well.

1 Like

I changed the code to Seeds, Temp, and "C", which reflects how the columns are displayed in my excel.

This topic was automatically closed 42 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.