# NOT RUN {
## set up a 2 x 2 mean operator that takes the mean of a vector of 2 values
m <- matrix(rep(0.5,4), nrow=2)
## coerce to a projector
proj.m <- projector(m)
## extract its degrees of freedom
degfree(proj.m)
## create a projector based on the matrix m
proj.m <- new("projector", data=m)
## add its degrees of freedom and print the projector
degfree(proj.m) <- proj.m
print(proj.m)
# }
Run the code above in your browser using DataCamp Workspace