I use the function below to generate the betas for a given set of guess lambdas from my optimiser.
When running I often get the following warning message:
You could compare the result of rank(G) with the number of columns of G. If the rank is less than the column dimension, you will have a singular matrix.
rank(G)
G