I was going to implement code to look across all genus to see what genus of bacteria differed between time periods. We harvested oysters over the period of 4 months from 2 sites in WA.
The code I modified for this analysis is here:
timeSeriesFits = lapply(genusi,function(i){
fitTimeSeries(obj=obj2,
feature=i,
class= ??,
id="Location",
time="Collection_Date_cat",
lvl='genus',
B=10) # This should be set to a higher value
})
In this case, I converted the dates to numbers into the time variable. The ID I understood as should be corresponding to the two sites over time, so I put the ID as the location. However, I’m not sure what to put down for class, since it is a bit different from the mousedata example, where you used status which seems to represent nutritional status of the mouse. I put the ID variable as the individual sample names and the class I changed as location, but its spitting out
Error in env$fun(x, wk, env$env) : gss error in rk: unknown factor levels
Thank you