1. Learn
  2. /
  3. Courses
  4. /
  5. Scalable Data Processing in R

Connected

Exercise

Copying matrices and big matrices

If you want to copy a big.matrix object, then you need to use the deepcopy() function. This can be useful, especially if you want to create smaller big.matrix objects. In this exercise, you'll copy a big.matrix object and show the reference behavior for these types of objects.

Instructions

100 XP

The big.matrix object mort is available in your workspace.

  • Create a new variable, first_three, which is an explicit copy of mort, but consists of only the first three columns.
  • Set another variable, first_three_2 to first_three.
  • Set the value in the first row and first column of first_three to NA.
  • Verify the change shows up in first_three_2 but not in mort.