I'm importing a googlesheet into R using
#install.packages("googlesheets4")
library(googlesheets4)
df<-read_sheet("https://docs.google.com/spreadsheets/d/1f29HJXZAIiWOOkOQd1RYrgCyJY633Njip0nUg8DXLN8/edit#gid=0")
The above links to a sheet with a couple of rows for illustrative purposes
I run into issues when trying to manipulate the sheet because where there are formulas used to generate dates, for example, if these are blank they are classified as NULL rather than NA
For e.g I use the follwing =ARRAYFORMULA(IF(ISBLANK(O2:O1210),"",O2:O1210+5))
to generate a date in another cell if the cell the formula refers back to is blank then the cell contains the formula will also be blank, but this generates NULL values in R
I've tried using
df[is_empty(df)] = NA
df[df == NULL] <- NA
df[df == ""] <- NA
But none of these work, does anyone know of way to fix this?