similar to: efficient matrix approx

Displaying 20 results from an estimated 8000 matches similar to: "efficient matrix approx"

2013 Jan 16
1
function approx interpolation of time series data sets
Readers, Am trying to use the function 'approx' to interpolate time series data sets: data1: 01:23:40 5 01:23:45 10 01:23:50 12 01:23:55 7 data2: 01:23:42 01:23:47 01:23:51 01:23:54 The objective is to obtain interpolated values of 'data1' column 2 (5, 10, 12, 7) for the times shown in data2. Tried the following command but received the error shown:
2004 Aug 16
3
bus error /segmentation fault from 'approx' (PR#7177)
Full_Name: joerg van den hoff Version: 1.9.1 OS: MacOS and SunOS Submission from: (NULL) (149.220.4.88) follow up to ID 7166. something like approx(c(1,2),c(NA,NA),1.5,rule=2) crashes 1.9.1 on both systems (MacOS 10.3.5.: bus error, SunOS 5.9: segmentation fault) even if xout is within given x range (as in example above) where rule=2 seems not be relevant anyway.
2004 Apr 21
2
segfault in approx() (PR#6809)
This is R1.9.0, windows XP I run across the following: It is admittedly silly, but it shouldn't segfault: test <- list(y=1:100, x=rep(NaN, 100)) approx(test, xout=rep(NaN, 10)) Bombs! Kjetil Halvorsen
2009 Jul 21
1
bug in approx crashes R
Dear R-devel, The following line crashes R > approx(1, 1, 0, method='const', rule=2, f=0, yleft=NULL, ties='ordered')$y Process R:2 exited abnormally with code 5 at Tue Jul 21 14:18:09 2009 > version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 9.1 year
2023 Dec 09
1
Linear model and approx function
Dear all; I have a dataframe with several columns. The columns are the elevation, volume and the area of the cells (which were placed inside a polygon). I have extracted them from DEM raster to calculate the volume under polygon and the elevation for a specific volume of the reservoir. > head(x6,2) Elevation Vol Area V_sum A_sum 1 2145 13990.38 85.83053 13990.38
2019 May 08
3
[R] approx with NAs --> new argument 'na.rm=TRUE' ?!
>>>>> Robert Almgren >>>>> on Fri, 3 May 2019 15:45:44 -0400 writes [ __ to R-help __ -- here diverted to R-devel on purpose] > There is something I do not think is right in the approx() > function in base R, with method="constant" and in the > presence of NA values. I have 3.6.0, but the behavior > seems to be the same in
2019 May 10
0
[R] approx with NAs --> new argument 'na.rm=TRUE' ?!
I have now committed a version "fulfilling" your wish, partly at least, to R-devel . In the new approx(*, na.rm=FALSE) cases, the result of how NA's are treated does depend on the 4 different extrapolation rules {1, 2, 1:2, 2:1} The main reason was that I kept the low level code in C to do +- what it did before which automatically was using 'rule' to determine these
2013 Feb 26
2
Help on a code
Dear List,   I have the following code:   x <-c(0, 13.8333333333333, 38.1666666666667, 62.1666666666667, 85.9166666666667, 108.916666666667) y <-c(1.77, 2.39, 3, 2.65, 2.62, 1.8) Interpolated <- approx(x, y,xout=0:tail(x, n=1),method="linear") plot(Interpolated)   in this code x is time in hours (cumulative), and y is a biological variable. I am using linear interpolation
2003 Oct 23
2
OOP like handling of lists?
Hello, I am writing a package with a collection of several models. In order to allow users to play interactively with the models (in contrast to hacking lengthy scripts), I want to put all what is needed to run a particular model into a single list object for each model. Then there will be a collection of functions to run the model or to modify parameters, time steps, integration method ...,
2010 Nov 03
3
R package BibTex entries: looking for a more general solution
== Summary == * Problem: BibTeX entries extracted from R packages via citation() require too much manual editing to be of general use. * Proposal: Date: fields should be made mandatory in package DESCRIPTION files, perhaps beginning with warnings from R CMD check * Proposal: Package authors should be encouraged to use a (new) Contributors: field in the DESCRIPTION file rather than packing all
2011 Oct 20
0
Apply approx() to an array and eventually a list of arrays
Hello all, I'm struggling to grasp how I might use lapply() instead of looping to run approx() on a list consisting of multiple arrays - each of equal dimension. But simpler than that, I haven't been able to successfully apply approx() to an array, unless I loop through the third dimension and extract the matrix. See example code below... Any suggestions will be gratefully received. Thanks
2004 Aug 13
2
bus error /segmentation fault from 'approx' (PR#7166)
Full_Name: joerg van den hoff Version: 1.9.0 and 1.7.1 OS: MacOS (1.9.0), SunOS (1.7.1) Submission from: (NULL) (149.220.4.88) something like (sure not the originally intended input, but something like this can happen...): approx(c(1,2),c(NA,NA),1.5) crashes R (bus error under MacOS, segmentation fault under SunOS). search of the bug archive did not work. I hope this bug was not reported
2009 Mar 25
1
Interpolate x from y
Is it possible to interpolate a value for x with knowledge of y? For example, approx(x, y, xout) will give me y's given a set of x's, which is opposite to what I'm after. I've tried switching x and y, e.g., approx(y, x, xout), but in a real data set it is possible to have more than one y for a given x causing approx() to remove coordinates. Thanks for your help, Greg.
2004 Mar 11
4
Summary: do.call and environments
To use the modify the solution from Tony and I so that you can pass the name of the function, rather than the function itself, like this: x <- 7 fx <- function(y) print(x*y) f <- function(fun, x) { fun <- get(fun) environment(fun) <- environment() do.call("fun",list(3)) } f("fx",2) --- Date: Thu, 11 Mar 2004 08:22:45 +0100 From:
2000 Dec 18
2
Segmentation fault with expression on linux
I have a problem, that the plot of mathematical formula sometimes crashes R on Linux (SuSE 6.2 and 7.0 on a Dual PIII/500 machine with 1GB RAM). The problem occurs for example in demo("graphics"), i.e. in the last part were the mathematical symbols are plotted. There are several circumstances to reproduce this segmentation fault, but the following is one of the most simple examples. The
2013 Feb 14
1
approxfun values
Readers, According to the help '?approxfun', the function can be used to obtain the interpolated values. The following test was tried: > testinterpolation<-read.csv('test.csv',header=FALSE) > testinterpolation V1 V2 1 10 2 2 20 NA 3 30 5 4 40 7 5 50 NA 6 60 NA 7 70 2 8 80 6 9 90 9 10 100 NA >
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
2001 Mar 15
1
supressing linefeed at end of file
Hello, I want to do simulations with an external simulation model. For this purpose I wrote a R-script which makes the pre- and post-processing of the data (generate scenarios, analyze results). The R-script writes the input file for the simulation with e.g. write(x, file="test.dat", ncolumns=10) The problem is, however, that this command (and even constructions with cat) will add a
2012 Feb 17
6
convert zoo object to "standard" R object so I can plot and output to csv file
Another newbie question I got the 1 minute spine interpolation and 15 mean aggregation working with many thanks to Gabor Grothendieck using Zoo functions. I got a tip from Hasan Diwan to look at xts but it seemed I would make better progress using code from Gabor. Now I'm having trouble plotting this zoo object. I'm thinking I want a function to "split" the zoo object back to
2005 Jul 21
1
About object of class mle returned by user defined functions
Hi, There is something I don't get with object of class "mle" returned by a function I wrote. More precisely it's about the behaviour of method "confint" and "profile" applied to these object. I've written a short function (see below) whose arguments are: 1) A univariate sample (arising from a gamma, log-normal or whatever). 2) A character string