search for: pfun

Displaying 20 results from an estimated 27 matches for "pfun".

Did you mean: pfn
2010 Oct 15
1
Downloading file with lapply
...9;m still getting familiar with lapply I have this date sequence x <- seq(as.Date("01-Jan-2010",format="%d-%b-%Y"), Sys.Date(), by=1) #to generate series of dates I want to apply the function for all values of x . so I use lapply (Still a newbie!) I wrote this test function pFun <- function (x) { print(paste("This is: ",x,sep="")) } When I run it: > lapply(x,pFun(x)) It gives the result correctly.. but end with an error Error in match.fun(FUN) : 'pFun(x)' is not a function, character or symbol Question 1: What is the issue here...
1998 Apr 12
3
R-beta: S Compatibility (again)
While I think total compatibility is not possible or even very important I have become aware recently of some fairly low level incompatibilities that have rather serious consequences for interchange between systems. Some of these are possibly well known, but I put them on on record here just in case. (I do not expect any action on these, of course, but people may want to note them, and correct
1998 Apr 12
3
R-beta: S Compatibility (again)
While I think total compatibility is not possible or even very important I have become aware recently of some fairly low level incompatibilities that have rather serious consequences for interchange between systems. Some of these are possibly well known, but I put them on on record here just in case. (I do not expect any action on these, of course, but people may want to note them, and correct
2016 Aug 03
2
polypath winding rule with transparency
Hi, I see different results in png() and pdf() for polypath() on Windows when using the "winding" rule ## overlapping, both clock-wise x <- cbind(c(.1, .1, .6, .6, NA, .4, .4, .9, .9), c(.1, .6, .6, .1, NA, .4, .9, .9, .4)) pfun <- function() { plot(x) polypath(x * 0.8 + 0.2, rule = "winding", col = "#BEBEBE80") polypath(x, rule = "winding", col = "#BEBEBE80") } ## output "windows.png/pdf" or "unix.png/pdf" label <- .Platform$OS.type png(sprintf(&q...
2016 Aug 04
2
[FORGED] Re: polypath winding rule with transparency
...different results in png() and pdf() for polypath() on Windows >> when using the "winding" rule >> >> ## overlapping, both clock-wise >> x <- cbind(c(.1, .1, .6, .6, NA, .4, .4, .9, .9), >> c(.1, .6, .6, .1, NA, .4, .9, .9, .4)) >> >> pfun <- function() { >> plot(x) >> polypath(x * 0.8 + 0.2, rule = "winding", col = "#BEBEBE80") >> polypath(x, rule = "winding", col = "#BEBEBE80") >> } >> >> ## output "windows.png/pdf" or "unix.png/p...
2016 Aug 03
0
polypath winding rule with transparency
...> wrote: > Hi, I see different results in png() and pdf() for polypath() on Windows > when using the "winding" rule > > ## overlapping, both clock-wise > x <- cbind(c(.1, .1, .6, .6, NA, .4, .4, .9, .9), > c(.1, .6, .6, .1, NA, .4, .9, .9, .4)) > > pfun <- function() { > plot(x) > polypath(x * 0.8 + 0.2, rule = "winding", col = "#BEBEBE80") > polypath(x, rule = "winding", col = "#BEBEBE80") > } > > ## output "windows.png/pdf" or "unix.png/pdf" > label <...
2017 Apr 24
1
polypath winding rule with transparency
...>> >> when using the "winding" rule >> >> >> >> ## overlapping, both clock-wise >> >> x <- cbind(c(.1, .1, .6, .6, NA, .4, .4, .9, .9), >> >> c(.1, .6, .6, .1, NA, .4, .9, .9, .4)) >> >> >> >> pfun <- function() { >> >> plot(x) >> >> polypath(x * 0.8 + 0.2, rule = "winding", col = "#BEBEBE80") >> >> polypath(x, rule = "winding", col = "#BEBEBE80") >> >> } >> >> >> >> ## o...
2016 Aug 04
0
[FORGED] Re: polypath winding rule with transparency
...) for polypath() on Windows > >> when using the "winding" rule > >> > >> ## overlapping, both clock-wise > >> x <- cbind(c(.1, .1, .6, .6, NA, .4, .4, .9, .9), > >> c(.1, .6, .6, .1, NA, .4, .9, .9, .4)) > >> > >> pfun <- function() { > >> plot(x) > >> polypath(x * 0.8 + 0.2, rule = "winding", col = "#BEBEBE80") > >> polypath(x, rule = "winding", col = "#BEBEBE80") > >> } > >> > >> ## output "windows.png...
2011 Aug 26
1
methods() not listing some S3 plot methods...?
....nls* plot.nmGroupedData* plot.pdMat* [31] plot.ppr* plot.prcomp* plot.princomp* [34] plot.profile.nls* plot.ranef.lme* plot.ranef.lmList* [37] plot.shingle* plot.simulate.lme* plot.spec [40] plot.stepfun plot.stl* plot.table* [43] plot.trellis* plot.ts plot.tskernel* [46] plot.TukeyHSD plot.Variogram* Non-visible functions are asterisked > pmeth <- methods("plot") > grep("plot.mgcv.smooth&...
2005 Dec 23
2
convolution of the double exponential distribution
Is there any R function that computes the convolution of the double exponential distribution? If not, is there a good way to integrate ((q+x)^n)*exp(-2x) over x from 0 to Inf for any value of q and for any positive integer n? I need to perform the integration within a function with q and n as arguments. The function integrate() is giving me this message: "evaluation of function gave a
2017 Jun 16
0
"reverse" quantile function
...y x <- rnorm(5) curve(quantile(x,p), xname="p") The breakpoints for the default quantiles are n points evenly spread on [0,1], including the endpoints; i.e., for n=5, (0, .25, .5, .75, 1) So: x <- rnorm(5) br <- seq(0, 1, ,5) qq <- quantile(x, br) ## actually == sort(x) pfun <- approxfun(qq, br) (q <- quantile(x, .1234)) pfun(q) There are variations, e.g. the one-liner approx(sort(x), seq(0,1,,length(x)), q)$y -pd > On 16 Jun 2017, at 01:56 , Andras Farkas via R-help <r-help at r-project.org> wrote: > > David, > > thanks for the respo...
2017 Jun 15
2
"reverse" quantile function
David, thanks for the response. In your response the quantile function (if I see correctly) runs on the columns versus I need to run it on the rows, which is an easy fix, but that is not exactly what I had in mind... essentially we can remove t() from my original code to make "res" look like this: res<-apply(z, 1, quantile, probs=c(0.3)) but after all maybe I did not explain
2017 Jun 16
2
"reverse" quantile function
...y x <- rnorm(5) curve(quantile(x,p), xname="p") The breakpoints for the default quantiles are n points evenly spread on [0,1], including the endpoints; i.e., for n=5, (0, .25, .5, .75, 1) So: x <- rnorm(5) br <- seq(0, 1, ,5) qq <- quantile(x, br) ## actually == sort(x) pfun <- approxfun(qq, br) (q <- quantile(x, .1234)) pfun(q) There are variations, e.g. the one-liner approx(sort(x), seq(0,1,,length(x)), q)$y -pd > On 16 Jun 2017, at 01:56 , Andras Farkas via R-help <r-help at r-project.org> wrote: > > David, > > thanks for the respo...
2007 Oct 26
5
help
hello, please can anyone help me out. Am a new user of R program. Am having problem with this code below, not getting the expected results. 1. Each m, the cumulative sum should be 1.000 but the 2nd and 3rd m returned 2.000 and 3.000 instead of 1.000. 2. to get the LCL(m) and UCL(m) for each m base on these instructions if out.cum > 0.025 then LCL(m)= y-1 if out.cum >0.975
2011 Jun 30
2
Saving fExtremes estimates and k-block return level with confidence intervals.
I am estimating a large model by groups. How do you save the results and?returns the associated quantiles? For this example I need a data frame n?? ?xi??????? mu????????beta 1?? 0.1033614? 2.5389580 0.9092611 2? ?0.3401922? 0.5192882 1.5290615 3?? 0.5130798? 0.5668308 1.2105666 I also want to apply gevrlevelPlot() for each "n" or group. ? #Example n <- c(1, 1, 1, 1, 1, 1, 2, 2, 2,
2012 Mar 23
0
[LLVMdev] Execution Engine: CodeGenOpt level
...PMBuilder.Inliner = createFunctionInliningPass(Opt == CodeGenOpt::Aggressive ? 250 : 200); } pFPasses = new FunctionPassManager(pMod); pFPasses->add(new TargetData(*TD)); PMBuilder.populateFunctionPassManager(*pFPasses); pFPasses->doInitialization(); pFPasses->run(*pFun); pFPasses->doFinalization(); delete pFPasses; pMPasses = new PassManager(); pMPasses->add(new TargetData(*TD)); pMPasses->add(createCFGSimplificationPass()); pMPasses->add(createBlockPlacementPass()); PMBuilder.populateModulePassManager(*pMPasses); pMPas...
2012 Feb 22
1
Median In Survival
hi I have a problem with  Median in Survival. when I use S1=survfit(Surv(Time,Status)) the result shows the median but I cannot use it as numeric! S1$median in Null   Could u pleas help me. Many Many Tank You. Niloofar. [[alternative HTML version deleted]]
2003 May 07
0
Re: frailty models in survreg() -- survival package (PR#2934)
SEE ALSO ORIGINAL POSTING IN PR#2933 On May 6, 2003 03:58 pm, Thomas Lumley wrote: > > Looking at a wider context in the code > > pfun <- function(coef, theta, ndeath) { > if (theta == 0) > list(recenter = 0, penalty = 0, flag = TRUE) > else { > recenter <- log(mean(exp(coef))) > coef <- coef - recenter > nu <- 1/theta > li...
2012 Mar 22
4
[LLVMdev] Execution Engine: CodeGenOpt level
Hi, How can I dynamically change the code generation optimization level (e.g., None) of a JIT in other to recompile a function with a new optimization level (e.g., Default)? Thank you. Best regards, Nurudeen.
2003 May 07
0
Re: frailty models in survreg() -- survival package (PR#2934)
...ch was shown to lead to the same EM solution as penalty (1) -- at least > in the case of a Cox proportional hazard model (Therneau and Grambsch, > 2000. Modeling Survival Data, Extending the Cox Model. Springer, New York. > Page 254, Eq. (9.8).). Looking at a wider context in the code pfun <- function(coef, theta, ndeath) { if (theta == 0) list(recenter = 0, penalty = 0, flag = TRUE) else { recenter <- log(mean(exp(coef))) coef <- coef - recenter nu <- 1/theta list(recenter = recenter, first = (ex...