I posted a similar question a while ago and got an anwser that worked for an xts:
standardize<-function(ts) { as.xts(apply(ts, 2, function(x) x / x[1])) }
Now I have a tsibble that fails with a:
Error in x/x[1] : non-numeric argument to binary operator
require(fpp3)
goog<-gafa_stock|>filter(Symbol=="GOOG",year(Date)==2018)
close<-goog|>select(Close)
close1 <- apply(close, 2, function(x) x / x[1])