similar to: Problems with bilinear interpolation of a grid

Displaying 20 results from an estimated 2000 matches similar to: "Problems with bilinear interpolation of a grid"

2008 Jun 17
2
Reshape or Stack? (To produce output as columns)
Dear all, I have used 'read.table' to create a data frame of 720 columns and 360 rows (and assigned this to 'Jan'). The row and column names are numeric: > columnnames <- sprintf("%.2f", seq(from = -179.75, to = 179.75, length = 720)). > rnames <- sprintf("%.2f", seq(from = -89.75, to = 89.75, length = 360)) > colnames(Jan) <- columnnames
2008 Jul 15
3
Melt (reshape) question
Dear all, I have a grid of 720 columns by 360 rows of global population density values, and hope to convert this to column format using the 'melt' command in the 'reshape' package. I'm not receiving any errors as such, but when the code has finished running, my output looks like this: > head(PopDens.long) Latitude Longitude PopDensity 1 -84.75 V1 0 2
2011 Oct 22
0
error on Fast bilinear interpolator from a grid
Dear all, I'm new user of R package. I'm trying to interpolate climate variables from ERA data. Original data contains 6 column with 29,040 lines, and x, y dimension are 240x121. I would like to get new data from column name: "lon", "lat" and "temp" by x, y dimension are 3,586x1,800 So I used the code as below, but I got error message as "z[cbind(lx1
2009 Apr 08
2
Reshape - strange outputs
Dear R Users, I am using the reshape package to reformat gridded data into column format using the code shown below. However, when I display the resulting object, a single column is fomed (instead of three) and all the latitude values (which should be in either column one or two) are collected at the bottom. Also, the NA values aren't removed, despite this being requested in the code. Code:
2009 Aug 14
4
Assigning values based on a separate reference (lookup) table
Dear R Users, I have a data frame of 360 rows by 720 columns (259200 values). For each value in this grid I am hoping to apply an equation to, to generate a new grid. One of the parts of the equation (called 'p') relies on reading from a separate reference table. This is Table 4 at: http://www.fao.org/docrep/s2022e/s2022e07.htm#3.1.3%20blaney%20criddle%20method (scroll down a little).
2004 May 11
2
bilinear and non linear
Dear all, there are R packages able to simulate or estimate bilinear model for time series? I know it is an open problem, but do exist something for very simplified bilinear models? Alternatively, what kinfd of non linear time series models are performed in R? If R is not able, could someone suggest me for some commercial softwares to deal with bilinear models? i'm afraid of a negative
2006 Jul 18
1
bilinear regression
I think this is an easy question, but I would be grateful for any advice on how to implement this in R. I simply have a response variable (y) that I am trying to predict with one explanatory variable (x) but the shape of the scatter plot is distinctly bilinear. It would be best described by two straight lines. Is there a way of fitting a linear model to give me a bilinear fit and (more
2007 Dec 04
1
2/3d interpolation from a regular grid to another regular grid
Hello R users, I have numerical data sampled on two grids, each one shifted by 0.5 from the other. For example: grid1 = expand.grid(x=0:3, y=0.5:2.5) grid2 = expand.grid(x=0.5:2.5, y=0:3) gridFinal = expand.grid(x=0.5:2.5, y=0.5:2.5) plot(gridFinal, xlim=c(0,3), ylim=c(0,3), col="black", pch=19) points(grid1, xlim=c(0,3), ylim=c(0,3), col="red", pch=19) points(grid2,
2010 Feb 04
2
2 dimensional interpolation from matlab to R
Hi everybody. i have 2 datasets : one with a long grid a lat grid and a bathymetry grid the second one only has the long and lat coordinates. So i want to know the bathymetry associated to the second dataset. I thought it was a good idea to do an interpolation between the two datasets. I find a script doing that on matlab but i want to do it on R. Do you how to do it? for ii =
2008 Oct 01
0
cubic bivariate interpolation on regular grid
Please help me to produce smoothed contour plots. I have dependent data generated at regular intervals of two independent variables and would like to produce smoothed contour plots - I cannot get interp (alima) to produce cubic interpolations of the data, only linear ones. I'm interested in smoothing as the data generation process is stochastic and produces small variations which I'd
2009 Mar 31
0
Row/columns names within 'assign' command
Dear all, I am attempting to add row and column names to a series of tables (120 in total) which have 2 variable parts to their name. These tables are created as follows: # Create table indexes index <- expand.grid(year = sprintf("%04d", seq(1986, 1995)), month = sprintf("%02d", 1:12)) # Read in and assign file names to individual objects with variable name components
2008 Jun 14
1
Correcting the display of colnames and rownames
Dear all, I have a data frame of dimension 720 columns by 360 rows, to which I am trying to add numerical row and column labels to, using the 'sequence' command. The original data, which I read in using 'read.table', had no such labels at all. I've got as far as successfully using the sequence command and getting the labels to display. However, I'm finding that for the
2003 Jan 30
2
nearest neighbour interpolation
Dear Help List, My name is Matt Oliver. I have been using R for about a year and find it very helpful. However, I have a need for a function that I cannot find. I am not very good at programming so I thought I would ask the group. I have an irregular grid of data (x = Longitude, y = Latitude). Each pair of my x,y has a categorical value. Obviously linear or any other numerically based
2008 Sep 01
2
Interpolation Problems
Dear all, I'm trying to interpolate a dataset to give it twice as many values (I'm giving the dataset a finer resolution by interpolating from 1 degree to 0.5 degrees) to match that of a corresponding dataset. I have the data in both a data frame format (longitude column header values along the top with latitude row header values down the side) or column format (in the format latitude,
2006 Mar 14
1
Interpolate univariate data on regular 3D grid to new 3D grid
Dear R Users, I have some data that is very similar in form to a 3D image - ie univariate data on a regular 3D grid. I keep this as a 3D numeric array in R with attributes describing the sampling points along the 3 dimensions. I would like to interpolate this onto a new regular 3D grid that I specify (eg by supplying 3 vectors corresponding to the new grid locations on each of the 3
2006 Dec 12
2
how do you interpolate a gaussian grid to a standard 2.5 degree grid?
Dear R-help community, I have looked on the R search site and archives but cannot find mention of a way of interpolating a gaussian distribution of data to a standard 2.5 degree grid. I have two global dataset and I need to correlate - unfortunately one is a 2.5 degree grid dim[longitude=144,latitude=72] and one is gaussian dim[longitude=192,latitude=94]. I would rally appreciate hearing
2018 May 22
0
How to average values from grid cells with coordinates
Hi Jim, Thanks. It works. I now have more complex problems. If at each blackcell, there are two variables such as pop and mood. For each variable, there are daily records in one year, so 365 records for pop and 365 records for mood. The averaged values for the redcells should be daily records too. What kind of format do you recommend for this problem? Right now, I just get the latitudes and
2018 May 20
1
How to average values from grid cells with coordinates
Hi lily, It's not too hard to do it using dataframes. Getting the indexing right is usually that hardest part: # these values are the centers of the black cells lat<-rep(28:38,11) lon<-rep(98:108,each=11) pop<-sample(80:200,121) # just use the data.frame function blackcells<-data.frame(lat=lat,lon=lon,pop=pop) plot(0,type="n",xlim=c(97.5,108.5),ylim=c(27.5,38.5),
2013 Feb 16
1
odd behavior within R2HTML
Dear R People: I'm using R2HTML but having a strange result. Here is the original data: resp trt block 90.3 A I 89.2 A II 98.2 A III 93.9 A IV 87.4 A V 97.9 A VI 92.5 B I 89.5 B II 90.6 B III 94.7 B IV 87.0 B V 95.8 B VI 85.5 C I 90.8 C II 89.6 C III 86.2 C IV 88.0 C V 93.4 C VI 82.5 D I 89.5 D II 85.6 D III 87.4 D IV 78.9 D V 90.7 D VI And here are the commands: > resin1.df <-
2004 Aug 22
1
latitude longitude data
Dear R-helpers, I get GPS readings with bug counts (bugs meaning insects in this case) made along rows in crop fields and use these to make maps of bug distribution. The GPS readings are not quite accurate enough for my purpose, so since I know what row each reading is made in, I adjust the latitudinal coordinate using: grd<-lm(lat~lon+Row,data)