Displaying 20 results from an estimated 20000 matches similar to: "Filling a grid based on existing data"
2005 Oct 13
1
expand.grid problem
Hi all,
I want to make all possible combination from dataset below:
V1 <- c(0,1,2)
V2 <- c(0,1)
V3 <- c(0,1)
V4 <- c(0,1)
V5 <- c(0,1)
V6 <- c(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)
V7 <- c(0,1,2,3,4,5,6)
V8 <- c(0,1)
V9 <- c(0,1)
V10 <- c(0,1)
V11 <- c(0,1)
V12 <- c(0,1)
V13 <- c(0,1)
V14
2012 Apr 03
3
filling small gaps of N/A
Hi everybody,
I'm a new R french user. Sorry if my english is not perfect. Hope you'll
understand my problem ;)
I have to work on temperature data (35000 lines in one file) containing some
missing data (N/A). Sometimes I have only 2 or 3 N/A following each other,
but I have also sometimes 100 or 200 N/A following each other. Here's an
example of my data, when I have only small gaps
2012 Oct 18
1
filling NA gaps according to previous data mean and following data mean
Hi everybody,
I have a little problem about filling some gaps of NAs in my data.
These gaps are between nearly constant data (temperature under snow). Here's
a fake example to illustrate how it looks like approximately:
DF <-
data.frame(data=c(-0.51,-0.51,-0.48,-0.6,-0.54,-0.38,-0.6,-0.42,NA,NA,NA,NA,NA,NA,NA,
-0.25,-0.41,-0.5,-0.5,-0.35,-0.7,-1,-0.87))
I would like to replace my NAs
2010 Mar 25
1
Creation of a new data frame
Dear all,
I have a data frame of 18556 rows and 19 columns and wish to create a new grid from these data of dimensions 360 rows and 720 columns.
The existing data frame is set up so that every 38 rows makes up one row of the new data frame, with 2 NA values at the end of each 'block' that should be removed before being inserted into the new grid.
So to be clear, row 1 of the new data
2010 Feb 09
2
Resampling a grid to coarsen its resolution
Dear all,
I have a grid (data frame) dataset at 0.5 x 0.5 degrees spatial resolution (720 columns x 360 rows; regular spacing) and wish to coarsen this to a resolution of 2.5 x 2.5 degrees. A simple calculation which takes the mean of a block of points to form the regridded values would do the trick. Values which should be excluded from the calculation are -9999 (unless all points within a block
2004 Oct 06
3
flac-1.1.1 completely broken on linux/ppc and on macosx if built with the standard toolchain (not xcode)
Sadly the latest optimization broke completely everything.
The asm code isn't gas compliant. the libFLAC linker script has a typo,
disabling the asm optimization and/or altivec won't let a correct build
anyway.
Instant fixes for the asm stuff:
sed -i -e"s:;:\#:" on the lpc_asm.s
to load address instead of addis+ori you could use
lis and la and PLEASE use the @l(register)
2015 Aug 22
3
sprintf error: "only 100 arguments allowed"
I'm trying to apply a function defined in the VW R docs, that attemps to
convert a data.table object to Vowpal Wabbit format. In the process i'm
getting the error in printf mentioned in the subject.
The original function is here:
https://github.com/JohnLangford/vowpal_wabbit/blob/master/R/dt2vw.R
Below there is a small example that reproduces the error. The function
works great with
2012 Jun 27
1
Filling In Grid based on 0 and 1
Hi,
I'm wondering if I can do this in R. I have a data set with questions
(x-value) and respondents (y-value). If the respondent answered the
question they get a 1 and if the respondent didn't answer the question they
have a 0. Is there anyway where I can graph something similar to a grid
where if a person answered a questions (value of 1) a cell gets shaded and
if a person didn't
2010 May 24
2
import data from a csv file
Hi all,
I have some trouble reading data from a csv file.
I used command "read.delim("clipboard") to read in the data.
> aalpha.data <- read.delim("clipboard")
> class(aalpha.data)
[1] "data.frame"
> dim(aalpha.data)
[1] 8 25
> colnames(aalpha.data)
[1] "X" "V1" "V2" "V3" "V4"
2010 Nov 29
1
Filling in missing time samples with na.approx
Hi Everyone,
I have a some data from a sports gps device like the following:
time latitude longitude altitude distance heartrate
1 1277648884 0.304048 -0.793819 260 0.000000 94
2 1277648885 0.304056 -0.793772 262 4.307615 95
3 1277648888 0.304060 -0.793696 263 11.262347 97
4 1277648894 0.304075 -0.793544 263 25.237911 103
5 1277648898
2011 May 25
2
Fwd: transpose ?
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20110525/4926c5ee/attachment.pl>
2006 Feb 01
2
sort columns
Hi.
I have a simple (I think) question
My dataset have these variables:
names(data)
[1] "v1" "v2" "v3" "v4" "v5" "v6" "v7" "v8" "v9" "v10"
"v11" "v12" "v13" "v14" "v15" "v16" "v17"
2009 Apr 04
1
Problem with sample()
Hi,
I'm having a problem using sample() within a function.
Basically I get an error reading:
Error in sample(v, 1, prob = h) : non-positive probability
Can anyone advise me as to the possible origin of this error?
Here is my code
#Discretised Gillespie algorithm function (From SMfSB, D.J. Wilkinson)
gillespied=function (N, T=100, dt=1, ...)
{
tt=0
n=T%/%dt
x=N$M
2012 Sep 23
1
Background color in a grid plot seems to interfere with plot()
Hi,
Why does the upper left panel (in the plot below) not have a gray background?
Cheers,
Marius
require(grid)
require(gridBase)
pdf(file="Rplot.pdf", width=8, height=8, onefile=FALSE)
## set up the grid layout
gl <- grid.layout(5, 5, widths=unit(c(1.8, 8, 0.8, 8, 0.8), "cm"),
heights=unit(c(0.8, 8, 0.8, 8, 1.5), "cm"))
if(FALSE) grid.show.layout(gl)
2008 Dec 09
2
Need help optimizing/vectorizing nested loops
Hi,
I'm analyzing a large number of large simulation datasets, and I've
isolated one of the bottlenecks. Any help in speeding it up would be
appreciated.
`dat` is a dataframe of samples from a regular grid. The first two
columns are the spatial coordinates of the samples, the remaining 20
columns are the abundances of species in each cell. I need to calculate
the species richness in
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).
2009 Jun 21
1
Problems with bilinear interpolation of a grid
Dear all,
I'm having trouble interpolating a number of gridded datasets that I have. I'm quite new to R so any help/advice that can be offered would be much appreciated!
Firstly I'll describe my dataset. The data is a grid of the planet at 1 degree spatial resolution, with each grid cell containing a value describing a particular variable (e.g. population density) for coordinate
2015 Aug 26
1
sprintf error: "only 100 arguments allowed"
Wouldn't it make sense to have this in the man page?
The 8192-byte limitation for 'fmt' is mentioned but not this one.
Thanks,
H.
On 08/25/2015 02:08 AM, Prof Brian Ripley wrote:
> From the sources:
>
> #define MAXNARGS 100
> /* ^^^ not entirely arbitrary, but strongly linked to
> allowing %$1 to %$99 !*/
>
>
>
> On 22/08/2015 04:21, Martin
2012 Feb 13
2
see NA
Dear All
I want to chose just spacial columns in R. (read table)
data1<- read.table("/home/Documents/data.txt",header=F,sep = "\t", as.is =F)
data.2<-data1[sub.data[,1],]
The dimension of data.2 is correct but my data are transformed NA
head(data.2)
V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V15 V16 V17 V18
V19 V20 V21 V22 V23 V24
NA <NA> NA NA NA
2009 May 18
1
Read.table problems
Dear all,
I have a file which I've converted from NetCDF (.nc) to text (.txt) using ncdump in Unix (as I had problems using the ncdf package to do this). The first few rows (as copied and pasted from the Unix console) of the file appear as follows:
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,