Displaying 20 results from an estimated 6000 matches similar to: "R-alpha: dump() / dput() -- fail for "environmental" and attributed functions"
2007 Mar 15
1
How to use result of approxfun in a package?
I am working on a project where we start with start with 2 long,
equal-length vectors, massage them in various ways, and end up with a
function mapping one interval to another. I'll call that function
"f1." The last step in R is to generate f1 as the value of the
approxfun function. I would like to put f1 into a package, but
without having the package redo the creation of
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
>
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)),
2010 Aug 25
3
approxfun-problems (yleft and yright ignored)
Dear all,
I have run into a problem when running some code implemented in the
Bioconductor panp-package (applied to my own expression data), whereby gene
expression values of known true negative probesets (x) are interpolated onto
present/absent p-values (y) between 0 and 1 using the *approxfun -
function*{stats}; when I have used R version 2.8, everything had
worked fine,
however, after updating
2009 Mar 18
0
modification of the function ecdf
Dear R users,
I am trying to minimize the distance between my data points and theoretical
gamma distribution over shape and scale parameters. the function "mde" from
actuar package does it for empirical distribution function and theoretical
gamma distribution. However, I would like to minimize the distance by using
only the data between 0.1 and 0.9 quantiles. I cannot use ecdf in this
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
2007 May 30
1
Sort in ecdf
Hi!
I've noticed the ecdf() R code (R ver. 2.5.0) contains two call to sort:
--- [R-code] ---
ecdf <- function(x)
x <- sort(x)
n <- length(x)
if (n < 1)
stop("'x' must have 1 or more non-missing values")
vals <- sort(unique(x))
rval <- approxfun(vals, cumsum(tabulate(match(x, vals)))/n,
method
2004 Mar 17
0
Plot 2 time series with different y axes (left and right)
Petr Pikal said:
> I am not really a R specialist but for this task I use function:
and he pasted his code into the email. I reindented the code, and
wrote a fragment to experiment with it. Here it is:
---------------------------------------------------------------------------
plot.yy <- function(x, yright, yleft,
yleftlim=NULL, yrightlim = NULL,
2006 Jan 18
0
R: ecdf - linear
I'm replying to R-devel, the mailing list which should be used
to discuss R feature enhancements.
>>>>> "Norman" == Norman Warthmann <norman at warthmann.com>
>>>>> on Wed, 18 Jan 2006 11:33:22 +0100 writes:
Norman> ..........
Norman> Is there a specific reason why in the ecdf-function
Norman> the variable
2017 Nov 23
0
adding percentage secondary y-axis
Hi
It is usually not recommended but if you insist
maybe
library(plotrix)
?twoord.plot
twoord.plot(lx=D[,1],ly=D[,2], rx=D[,1], ry=D[,3])
or
plot.yy(x=D[,1],yright=D[,3], yleft=D[,2])
which allows only one x axis (see below).
Cheers
Petr
plot.yy <- function (x, yright, yleft, yleftlim = NULL, yrightlim = NULL,
xlab = NULL, yylab = list(NA, NA), pch = c(1, 2),
col = c(1,2), linky
2017 Nov 23
2
adding percentage secondary y-axis
Thank you very much peter.
It worked out nicely.
I have additional question. How can I get Y-axis on log-scale?
Thank you very much in Advance,
Eliza
UoS
PP
________________________________
From: PIKAL Petr <petr.pikal at precheza.cz>
Sent: 23 November 2017 16:22:39
To: Eliza Botto; r-help at r-project.org
Subject: RE: adding percentage secondary y-axis
Hi
It is usually not
2008 Jan 11
1
Adding weights to ecdf
I would like you consider that the function ecdf
could be extended in the following way to handle weights
when computing Empirical distribution Functions. There
exist particular cases that supports this kind of
extension, see for example:
Rao, C. R., 1997.
Statistic and True. Putting chance to work.
World Scientific Publishing.
Cox, D. R., 1969.
Some Sampling Problems in Technology.
New
2008 Jul 20
3
asp and ylim
#See David Williams' book "Weighing the odds", p286
y <- c(1.21, 0.51, 0.14, 1.62, -0.8,
0.72, -1.71, 0.84, 0.02, -0.12)
ybar <- mean(y)
ylength <- length(y)
ybarv <- rep(ybar, ylength)
x <- 1:ylength
plot(x,y,asp=1,xlab="position",ylab="ybar",type="n",ylim=c(-1,1))
segments(x[1], ybar, x[ylength], ybar)
segments(x,ybarv,x,y)
2009 Aug 24
0
R 2.9.2 is released
I've rolled up R-2.9.2.tar.gz a short while ago.
This is a maintenance release and fixes a number of mostly minor issues.
See the full list of changes below.
You can get it from
http://cran.r-project.org/src/base/R-2/R-2.9.2.tar.gz
or wait for it to be mirrored at a CRAN site nearer to you. Binaries
for various platforms will appear in due course (Duncan Murdoch is out
of town, so Windows
2009 Aug 24
0
R 2.9.2 is released
I've rolled up R-2.9.2.tar.gz a short while ago.
This is a maintenance release and fixes a number of mostly minor issues.
See the full list of changes below.
You can get it from
http://cran.r-project.org/src/base/R-2/R-2.9.2.tar.gz
or wait for it to be mirrored at a CRAN site nearer to you. Binaries
for various platforms will appear in due course (Duncan Murdoch is out
of town, so Windows
2008 Mar 26
0
approxfun + save: problem as R_approx changed package
Hi all,
I recently switched to R version 2.6.2 (from 2.5.0 I was using) on Windows XP.
I have a fair amount of previous data saved in the form of "approxfun" objects created by version 2.5.0, with code basically like this:
> x <- rlnorm(100,10,2)
> f <- approxfun(1:100,x)
> f(5)
[1] 313811.3
> save(f, file="mytest_approx.Rdata")
Now on 2.6.2, when I try to
2005 Nov 02
2
help with the coordinates of the ECDF object
Hi all R users
I would like to know how acess the coordinates
of the ECDF object.
I look for the example,
in this part:
######################
print(ls.Fn12 <- ls(env= environment(Fn12)))
######################
but I do not know to extract
the Y coordinate and put it in other variable.
My objective is to make a plot
and identify the points with labels.
############# Example by
2010 Sep 15
1
approxfun returning value higher than I would expect
Below is the code that I am using in a much larger function. I would
expect a bankfull measure at zero to be between 0.6 and 0.8 approxfun
is returning 0.8136986. I am sure that I am missing something.
measure_bkf <- (structure(list(measurment_num = c(0, 0.2, 0.4, 0.6,
0.8, 1, 1.2,
1.4, 1.6, 1.8, 2, 2.2, 2.4, 2.6, 2.8, 3, 3.2, 3.4), bankfull_depths_m
= c(-0.48,
-0.48, -0.42, -0.26, 0.58,
1997 Aug 25
1
R-alpha: R documentation problems
Last week I spent some time going through the Blue Book to figure out
what we are missing and where we are different. (Results will come in
subsequent emails.) As a byproduct, here is a list of the documentation
problems I found.
As soon as time and my knowledge of CVS allow, I'll try to fix some of
these ...
-k
***********************************************************************
* The
2008 Jun 19
1
error related to approxfun in R 2.7.0
I'm testing R version 2.7.0 on windows and there seems to be a
compatibility issue with objects that were created by "approxfun" in
older versions. As long as the objects were created in version 2.7.0
things work ok, but calling the interpolated functions from R version
2.0.1 causes this error:
Error in .C("R_approx", as.double(x), as.double(y), as.integer(n),
xout =