Hello,
I have a data frame with "n/a" instead of "NA" and I would like to change the format over the full data frame. I tried using the map()
function and the gsub()
function together:
vol2 <- vol %>%
map(gsub("n/a", "NA", vol), vol)
Obviously that syntax is a little redundant (and doesn't work), so I was wondering how I might be able to accomplish this.
Here is a subset of my data:
vol <- structure(list(SERIAL = c("166", "167", "177", "178", "179",
"186"), STIS. = c("n/a", "n/a", "n/a", "n/a", "n/a", "n/a"),
Volume_m3 = c(2.35845643690293, 14.7035018488167, 3.04633956433295,
2.78838339154669, 4.63092748287711, 8.73365899290616)), row.names = c(NA,
6L), class = "data.frame")
Thanks much!