Expand / transform a sparse matrix into a large sparse matrix

I know that the title of this question is confused if not mistaken. Sorry for that, let me explain what I'm trying to do:

# I have a population of individuals:
population <- c("Adam", "Bob", "Chris", "Doug", "Emily", "Frank", "George","Harry", "Isaac", "Jim", "Kyle", "Louis")
population_size <- length(population) # this is 12

# I then draw a sample from this population
mysample_size <- 5
mysample <- sample(population,mysample_size, replace=FALSE)

# I then simulate a network among the people in the sample
frn <- matrix(rbinom(mysample_size*mysample_size, 1, 0.4),nrow=n)
x[x<=0] <- 0
x[x>0] <- 1
rownames(frn) <- mysample 
colnames(frn) <- mysample

* Now I would like to transfer the values ​​from frn to a matrix that includes all the elements from the original population, i.e. 12 to 12 matrices. Values ​​in this matrix will come only from frn 5 * 5 matrix.

I don’t know how to generate the matrix below from the matrix above.

(, iGraph edgelists) , . , : , , , . .

+1
3

: ind = match(mysample,population) , , popn, popn[ind,ind] = frn. .

0
# create an empty matrix with NAs. You may have the full matrix already.
full_matrix <- matrix(rep(NA, population_size*population_size), nrow=population_size)
rownames(full_matrix) <- colnames(full_matrix) <- population
frn <- matrix(rbinom(mysample_size*mysample_size, 1, 0.4), nrow = mysample_size)
rownames(frn) <- colnames(frn) <- mysample
# Find the locations where they match
tmp <- match(rownames(frn), rownames(full_matrix))
tmp2 <- match(colnames(frn), colnames(full_matrix))

# do a merge
full_matrix[tmp,tmp2] <- frn
0

... .

library(Matrix)
# Make sure the columns match
population <- c( mysample, setdiff(population, mysample) )
ij <- which( frn != 0, arr.ind=TRUE )
m <- sparseMatrix( 
  i = ij[,1], j=ij[,2], 
  x = 1,  # or frn[ij]
  dim = length(population)*c(1,1), 
  dimnames = list(population, population) 
)
m
0