TNC-NMFO / NWLAND

carbon accounting model
0 stars 0 forks source link

scenario values need numeric? #147

Closed sbassett closed 2 years ago

sbassett commented 2 years ago
> for (i in 1:num_scenin_sheets) {
+   scenin_df_list[[i]] <- readWorksheet(scenin_wrkbk, i, startRow = start_row, colTypes = c(rep("character",4), rep("numeric",50)), forceConversion = TRUE)
+   # convert management acres to hectares as needed
+   if (units_scenario=="ac") {
+     scenin_df_list[[i]][,c("start_area", "end_area")] = scenin_df_list[[i]][,c("start_area", "end_area")] * ac2ha
+   }
+ } # end for i loop to read in scenarios
There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
Warning messages:
1: Cell A_Historical!G13 cannot be converted from String to Numeric - returning NA
2: Cell A_Historical!G14 cannot be converted from String to Numeric - returning NA
3: Cell A_Historical!G15 cannot be converted from String to Numeric - returning NA
4: Cell A_Historical!G16 cannot be converted from String to Numeric - returning NA
5: Cell A_Historical!G23 cannot be converted from String to Numeric - returning NA
6: Cell A_Historical!G24 cannot be converted from String to Numeric - returning NA
7: Cell A_Historical!G25 cannot be converted from String to Numeric - returning NA
8: Cell A_Historical!H13 cannot be converted from String to Numeric - returning NA
9: Cell A_Historical!H14 cannot be converted from String to Numeric - returning NA
...
sbassett commented 2 years ago

There are supposed to be NA's so we're ok!