similar to: Resampling a grid to coarsen its resolution

Displaying 20 results from an estimated 8000 matches similar to: "Resampling a grid to coarsen its resolution"

2008 Jul 26
1
Coarsening the Resolution of a Dataset
Dear all, I have gridded data at 5' (minutes) resolution, which I intend to coarsen to 0.5 degrees. How would I go about doing this in R? I've had a search online and haven't found anything obvious, so any help would be gratefully received. I'm assuming that there will be several 'coarsening' techniques available - I'm after something fairly simple, which for example,
2005 Sep 08
1
Coarsening Factors
It is not uncommon to want to coarsen a factor by grouping levels together. I have found one way to do this in R: > sites [1] F A A D A A B F C F A D E E D C F A E D F C E D E F F D B C Levels: A B C D E F > regions <- list(I = c("A","B","C"), II = "D", III = c("E","F")) > library(Epi) > region <-
2012 Oct 21
1
[newbie] failure to plot a RasterLayer with raster::plot or fields::image.plot
summary: spatial data to be input to a regional-scale environmental model must (1) be converted to netCDF and then (2) "regridded" (cropped, projected, increased resolution). In a public git repository https://github.com/TomRoche/GEIA_to_NetCDF I have R code (with bash drivers) that does the conversion step, and plots the converted output, apparently correctly. However attempts to plot
2009 Aug 17
3
Replacing NA values in one column of a data.frame
Dear all, I'm trying to replace NA values with -9999 in one column of a data frame. I've tried using is.na and the testdata[testdata$onecolumn==NA] <- 9999 approach, but whilst neither generate errors, neither result in -9999s appearing - the NAs remain there! I'd be grateful for any advice on what I'm doing wrong or any other suitable approaches. Many thanks, Steve
2009 Aug 17
3
Reshape package: Casting data to form a grid
Dear R Users, I'm trying to use the 'cast' function in the 'reshape' package to convert column-format data to gridded-format data. A sample of my dataset is as follows: head(finalframe) Latitude Longitude Temperature OrigLat p-value Blaney 1 -90 -38.75 NA -87.75 17.10167 NA 2 -90 135.75 NA -87.75 17.10167 NA 3 -90 80.25
2010 Sep 09
3
Alignment of lines within barplot bars
Dear all, I have a barplot upon which I hope to superimpose horizontal lines extending across the width of each bar. I am able to partly achieve this through the following set of commands: positions <- barplot(bar_values, col="grey") par(new=TRUE) plot(positions, horiz_values, col="red", pch="_", ylim=c(min(bar_values), max(bar_values))) ...however this results
2008 Sep 05
2
Use of colour in plots
Dear all, I have 3 datasets all of which share the same longitude and latitude values, which I'm looking to plot onto a scattergraph. The third dataset has values which can only be either '1' or '2'. So to incorporate all three datasets onto two axes, I'm wondering if I can plot dataset1 and dataset2 as normal, but then use colour to determine whether these points are
2009 May 04
4
Producing a legend successfullly
Dear all, I'm attempting to insert a legend into a line graph. I've sorted out the positioning, but I'm unable to display the sample line and associated colour to go within the legend box. Instead, under the variable names, the numbers 1, 2, 2, 3 are displayed in a column (with '2' repeated twice). This is the code I'm using: legend(80,1150, c("Simulation",
2010 Mar 24
1
Filling a grid based on existing data
Dear all, I currently have a data frame of dimensions 18556 rows by 19 columns. I want to convert this into a grid of dimensions 720 rows by 360 columns. The problem in this case is that not all rows in the initial data frame are complete (there are gaps). Therefore I am perhaps looking for a way of filling a 720 x 360 grid by reading in all values in each row until one is encountered which does
2009 May 18
8
Simple plotting errors
Dear R Users, I have 12 data frames, each of 12 rows and 2 columns. e.g. FeketeJAN MEAN SUM_ AMAZON 144.4997874 68348.4 NILE 5.4701955 1394.9 CONGO 71.3670036 21196.0 MISSISSIPPI 18.9273250 6511.0 AMUR 1.8426874 466.2 PARANA 58.3835497 13486.6 YENISEI 1.4668313 592.6 OB 1.4239179 559.6 LENA 0.9342164
2008 Sep 07
3
Averaging 'blocks' of data
Dear all, I have a large dataset which I hope to reduce in size, to make it more useable. I hope to do this by taking an average of each 60 x 60 blockof values and forming a new data frame out of the averaged values. How would I go about taking averages of 60 x 60 'blocks' in R, and cycling through the whole dataset, recording each calculated value in a new table/data frame? Many thanks
2010 Feb 08
2
Counting by rows based on multiple criteria
Dear all, I have a data frame of 6 columns and ~60000 rows which I hope to perform the following calculation on. For each row, I wish to determine whether there are a greater number of positive or negative numbers. Then, if there are more positive numbers in the row, count how many occur - but if there are more negative numbers in the row, count them instead and insert a minus symbol before
2003 Dec 16
6
Resampling Stats software
Hi, I am new to R (I have most of my experience in SAS and SPSS). I was wondering if anyone has used both Resampling Stats and R, and could comment on strengths/relationships. Also, I have no clue on how to do the various examples from the book "Resampling: The New Statistics" in R. Can anyone give me some possible starting points? Or websites/books? Thanks, Brandon
2011 May 01
1
caret - prevent resampling when no parameters to find
I want to use caret to build a model with an algorithm that actually has no parameters to find. How do I stop it from repeatedly building the same model 25 times? library(caret) data(mdrr) LOGISTIC_model <- train(mdrrDescr,mdrrClass ,method='glm' ,family=binomial(link="logit") ) LOGISTIC_model 528
2009 Jul 29
1
Systematic resampling (in sequential Monte Carlo)
Dear all, Here is a little coding problem. It falls in the category of "how can I do this efficiently?" rather than "how can I do this?" (I know how to do it inefficiently). So, if you want to take the challenge, keep reading, otherwise just skip to the next post - I won't be offended by that ;-) I am coding a particle filter and I want to use systematic resampling to
2006 Sep 22
2
A simple resampling problem
Dear UseRs I would like to show my students how to use "resampling" to solve the following simple problem: If a family has two children of which one is a boy, what is the probability that the other child is also a boy. The answer is (obviously) 1/3, and can be show easily using the usual methods. But I would like to get the students to think of resampling, by doing the following:
2002 Dec 22
1
oggdropXPd.exe crashes when resampling is activated
I need to encode a WAV to OGG but must resample to 22050 samples per second, but can't do that with oggdropXPd.exe. The application always crashes. What I do is: Start oggdropXPd.exe. Right-click on fish, choosing 'Encoding Options'. Under Advanced Options, I set Re-sample to 22050 samples per second. Click 'Accept'. Drag WAV on fish. In the directory where the WAV originates,
2009 Oct 09
4
Trendline for a subset of data
Dear all, I am using abline(lm ...) to insert a linear trendline through a portion of my data (e.g. dataset[,36:45]). However, I am finding that whilst the trendline is correctly displayed and representative of the data portion I've chosen, the line continues to run beyond this data segment and continues until it intersects the vertical axes at each side of the plot. How do I display the
2008 May 04
1
Residual resampling for non linear reg model
I was attempting to use the residual resampling approach to generate 999 bootstrap samples of alpha and beta and find their confidence intervals. However, I keep getting the error message:Error in nls(resample.mp ~ cases/(alpha + (beta * cases)), start = init.values, : singular gradientafter R has only produced a few bootstraps.Could anyone suggest where I am going wrong? Would greatly
2010 Jan 25
4
R Output and ArcGIS
Dear all, I've been using R on a Mac to process some data for export to ArcMap GIS (which only runs on Windows). ArcMap seems to require tab-delimited data (my data are in 3 columns), so I've been using the sep="\t" argument. However, this resulted in strange end-of-line characters when displayed on a PC. I looked in the write.table help file to find that eol="\r\n"