Questions tagged [replace]

The tag has no usage guidance.

7
votes
1answer
9k views

Replace NA's with 0 for raster data using R?

I am new in R. How can I replace NA's with 0 for my raster data which have spatial information?
3
votes
3answers
319 views

Replacing '+' with ', ' for labels in QGIS?

I want to replace a '+' with ', ' to label an attribute looking like "ZT10+ZT20+ZT30" to get "ZT10, ZT20, ZT30" using regexp_replace("zone_nr", '+', ', ') but I get an Eval Error: Invalid regular ...
2
votes
1answer
123 views

Changing raster values in specific zone only

I would like to replace raster values only in specific zone of the raster. Say this is my example raster: library(raster) r <- raster(ncol=1000, nrow=1000) r[] <- runif(ncell(r),0,1) extent(r) &...