Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
2 answers
101 views

Trying to apply inlabru:::bru_fill_missing to a SpatialPointsDataFrame to fill in NAs

I'm struggling with a function from the inlabru R package, which could help me fill in the NAs in my data. According to the helpfile, I need: bru_fill_missing( data, where, values) data is a ...
Michael Smith's user avatar
-1 votes
1 answer
70 views

How to convert missing values to the mean of the other values in R? [closed]

I need to convert the missing values of a column in a dataframe with the rest of values of this column, grouped by Districts and Month. This is a sample of my df1: Date Day Month Year ...
Alexa's user avatar
  • 99
4 votes
1 answer
608 views

Interpolating LiDAR intensity images in R?

I'd like to generate 0.5 m intensity images using lidR, but the resulting raster is full of pits. Here's a reproducible example: library(lidR) LASfile <- system.file("extdata", "MixedConifer.laz", ...
fgg's user avatar
  • 101
2 votes
2 answers
2k views

Getting a masked raster with no NAs and sum pixels within overlaying polygon?

I have done an IDW interpolation in R for precipitation data following the routine of Manny Gimond (https://mgimond.github.io/Spatial/interpolation-in-r.html) to get precipitation inside a catchment. ...
Basilique's user avatar
1 vote
0 answers
272 views

Space-Time Principal Component Analysis with Missing Lat/Long Data [closed]

I am looking to run a space-time Principal Component Analysis on Shotspotter data from Brockton, MA: http://justicetechlab.org/data/. Shotspotter sensors record the timing, location, and number of ...
isaac_analytics's user avatar
6 votes
4 answers
7k views

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

I want to replace all NA values in a large raster with 0. I found this answer to Replacing NAs with 0 for raster data using R : #getting a raster library(raster) f <- system.file("external/...
Steffen's user avatar
  • 61
2 votes
1 answer
2k views

R kriging cross validation returns NA for all prediction points?

I'm trying to cross-validate the results of an [auto]Krige output but for some unknown reason the results of both autoKrige.cv (automap package) and krige.cv (gstat package) return NA for all values (...
Tom Newton's user avatar
1 vote
2 answers
1k views

Export GRASS raster as GeoTIFF : nodata values exported as -nan (what happens in R?)

I am using the package raster to work with GeoTIFF raster files which I exported from GRASS using r.out.gdal. GRASS assigned the value -nan to some raster files (type FLOAT32) for missing values. ...
MercedesRD's user avatar
8 votes
1 answer
393 views

Interpolating points observed with different time duration

I am doing spatial interpolation with a group of points. Some points have complete observation of events: for a period of 24 hours we have observed N events in each point. These points have N events....
Gago-Silva's user avatar
  • 2,546
15 votes
1 answer
23k views

Replacing NAs with 0 for raster data using R [duplicate]

I am new in R. How can I replace NAs with 0 for my raster data which have spatial information?
user20347's user avatar
  • 151