This function is taken from the GrassmannOptim package by Kofi Placid Adragni and Seongho Wu https://cran.r-project.org/web/packages/GrassmannOptim/index.html
Usage
GrassmannOptim(
objfun,
W,
sim_anneal = FALSE,
temp_init = 20,
cooling_rate = 2,
max_iter_sa = 100,
eps_conv = 1e-05,
max_iter = 100,
eps_grad = 1e-05,
eps_f = .Machine$double.eps,
verbose = FALSE
)