Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 26145

Raster is a data format consisting of regular grids of values, usually stored in an image-like format.

4 votes
1 answer
9k views

Rescale raster in R

What's the best way to rescale a raster with range 0, 200 to range -1 to 1 in R? I'm currently using gdal_translate, but this requires that I write out a new file with the updated range. … If possible I'd like to simply store the new rescaled raster as a variable in R. gdal_translate(src_dataset = "input_data_path", dst_dataset = "output_data_path", scale = c(0, 200, -1.0, 1.0)) …
Emily's user avatar
  • 769