Displaying 20 results from an estimated 2000 matches similar to: "segfault in approx() (PR#6809)"
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.
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 Feb 19
1
efficient matrix approx
Hello,
I am looking for a highly efficient matrix version of linear
interpolation (like approx). As an example I have data like follows:
x<-data.frame(time=1:20, x=(1:20)/10, y=runif(20))
t <- seq(1.5, 15.5 ,by=0.5)
# and I found the following solution:
nam <- names(x)
app <- lapply(x[2:3],approx,x=x$time, xout=t)
r <- c(1, 2*(1:(ncol(x)-1)))
x.new <-
2009 Dec 01
3
paste name in for loop?
Hello,
I am trying to create subsets of grouped data (by area size), and use
the area size as part of the output name. The code below works for area
(xout) 1 and 50, the other files are given NA for an area.
A simple example:
xout <- c(1,5,10,25,50,100)
for(i in xout) { print(paste("Areal_Ppt_",xout[i],"sqmi.txt", sep="")) }
[1] "Areal_Ppt_1sqmi.txt"
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 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
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 Apr 16
1
Pb on startup with R1.9.0
I'm using Rprofile file on R1.9.0 startup and inside I'm loading a personal Library which uses winMenuAdd() and I've got this error :
Error in eval(expr, envir, enclos) : couldn't find function "winMenuAdd"
I hadn't this problem with others R versions.
What Can I do now to avoid that?
I'm using R1.9.0 under Win98.
[[alternative HTML version deleted]]
2015 Jun 30
3
Loop for: mostrar el nombre de la variables
Buenos días:
Después de más de 20 años en SAS, ahora igual me toca trabajar en R. Y la transición es muy dura: la "lógica" de los dos lenguajes es, para mi, totalmente diferente. Disculpen si lo que pregunto es una obviedad, pero llevo todo el día con esto y no logro encontrar la respuesta adecuada con google.
Estoy intentado crear una función que realice una descriptiva simple de
2012 Jun 06
2
package zoo, function na.spline with option maxgap -> Error: attempt to apply non-function?
Hello,
I'm trying to use na.spline (package zoo) to fill some missing data in a time series.
this works fine, however, if I apply the 'maxgap' argument, I always get the error:
<------
Error in na.spline.vec(x., coredata(object.), xout = xout., ...) : attempt to apply non-function
------>
I couldn't find a similar error for this case in the mailing lists and zoo vignette,
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
2004 Mar 27
1
Documentation typos/requests, R1.9.0 beta
I am working with the precompiled rw1090beta as of
2004-03-23.
?ts has in section "See also"
"Standard package 'ts' for many
additional time-series functions." td does not longer exist.
?plot.ts
example section uses library(ts)
?lines.ts
example section has library(ts)
Kjetil Halvorsen
2006 Jul 17
3
information about a function
Hi people,
I am new in this list and could not find a FAQ for it in particular,
furthermore I could not find my question answered in the official R
FAQ or docs.
I have simply something like this:
> f<-approxfun(data[,1],data[,2])
and f is:
> f
function (v)
.C("R_approx", as.double(x), as.double(y), as.integer(n), xout = as.double(v),
as.integer(length(v)),
2004 Jun 05
2
'invalid HOMEDRIVE'
Dear all,
One of my students have installed R1.9.0 on windows, and gets the fatal error
'invalid HOMEDRIVE'
Can anyone help her/me out on that one?
Thanks in advance
Søren Højsgaard
[[alternative HTML version deleted]]
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
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.
2011 May 04
1
bivariate linear interpolation
Hi,
I have three matrices (X,Y,P) with the same dimension. The X,Y grid is
regular and I want to
perform linear interpolation to pick out certain points. In matlab
appropriate call is
something like
Pout=interp2(X,Y,P,Xout,Yout, method="linear")
where Xout and Yout are the locations where I want the Pout data
(typically a different grid).
(Scipy has this routine in
2011 Mar 24
1
fraction with timelag
Dear r-help,
I'm having this DF
df <- data.frame(id = 1:6,
xout = c(1234, 2134, 234, 456, 324, 345),
xin= c(NA, 34,67,87,34, NA))
and would like to calculate the fraction (xin_t / xout_t-1)
The result should be:
# NA, 2.76, 3.14, 37.18, 7.46, NA
I am sure there is a solution using zoo... but I don't know how...
Thanks for any help!
Patrick
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