Skip to content

Commit

Permalink
added 2 copy() commands
Browse files Browse the repository at this point in the history
  • Loading branch information
rklasky committed Jan 23, 2024
1 parent 1bdb795 commit 651eb5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test-rpath.R
Original file line number Diff line number Diff line change
Expand Up @@ -928,15 +928,15 @@ testthat::test_that("Rpath Unit Tests", {

# Looks like this is causing the error...try re-writing it
#
ForcedBio <- REcosystem_scene_jitter$forcing$ForcedBio
ForcedBio <- copy(REcosystem_scene_jitter$forcing$ForcedBio)
for (i in 1:length(species)) {
aSpecies <- species[[i]]
numMonths <- nrow(ForcedBio)
# print(paste0(modNum," ",i," ",SEED_OFFSET," ",aSpecies))
speciesBiomass <- REcosystem_scene_jitter$start_state$Biomass[aSpecies]
ForcedBio[,aSpecies] <- createJitterVectorFromValue(speciesBiomass, numMonths, modNum*i*SEED_OFFSET, "Months","Biomass (mt/km²)",paste0(theTypeData,' with ','Jittered',' Noise - ',aSpecies))
}
REcosystem_scene_jitter$forcing$ForcedBio <- ForcedBio
REcosystem_scene_jitter$forcing$ForcedBio <- copy(ForcedBio)

# Refactoring these lines
# modifiedBio <- modifyForcingMatrix(modNum,species,'Jittered',theTypeData,REcosystem_scene_jitter$forcing$ForcedBio,REcosystem_scene_jitter)
Expand Down

0 comments on commit 651eb5a

Please sign in to comment.