I am trying to run code about algorithm of the matrix reconstruction.

I tried two different method:

First, I am trying online editor to run code below link.

It gives error:

Error in library(kyoustat/ROptSpace) : 'package' must be of length 1

Execution halted

Secondly, copy the codes from below two links to Rstudio as a two different R script file.

I run successively, this time gives error below:

[1] "* OptSpace: Guessing an implicit rank."

Error in guess_rank(M_E, nnZ.E) : could not find function "guess_rank"

How I run this codes ? Thank you.