Displaying 20 results from an estimated 1000 matches similar to: "MATLAB vrs. R"
2010 Oct 08
1
Trapezoid Rule
Dear R Users,
I've never used R before and my professor has asked us to do some
pretty intense programming (or it's intense to me at least). Here is
the question: Modify the function myquadrature inside the script so
that it returns the quadrature of descrete data using the trapezoidal
rule. Modify the call to the function at the bottom of the script so
that is uses your modifies
2006 Jan 08
1
confint/nls
I have found some "issues" (bugs?) with nls confidence intervals ...
some with the relatively new "port" algorithm, others more general
(but possibly in the "well, don't do that" category). I have
corresponded some with Prof. Ripley about them, but I thought I
would just report how far I've gotten in case anyone else has
thoughts. (I'm finding the code
2005 Jan 12
4
Finding seasonal peaks in a time series....
I have a seasonal time series. I want to calculate the annual mean
value of the time series at its peak
(say the mean of the three values before the peak, the peak, and the
three values after the peak).
The peak of the time series might change cycle slightly from year to year.
# E.g.,
nPts <- 254
foo <- sin((2 * pi * 1/24) * 1:nPts)
foo <- foo + rnorm(nPts, 0, 0.05)
bar <- ts(foo,
2006 Jan 23
1
too-large notches in boxplot (PR #7690)
PR #7690 points out that if the confidence intervals (+/-1.58
IQR/sqrt(n)) in a boxplot with notch=TRUE are larger than the
hinges -- which is most likely to happen for small n and asymmetric
distributions -- the resulting plot is ugly, e.g.:
set.seed(1001)
npts <- 5
X <- rnorm(2*npts,rep(3:4,each=npts),sd=1)
f <- factor(rep(1:2,each=npts))
boxplot(X~f)
boxplot(X~f,notch=TRUE)
I can
2006 Jan 19
1
nls profiling with algorithm="port" may violate bounds (PR#8508)
[posted to R-devel, no discussion:
resubmitting it as a bug, just so it gets
logged appropriately]
Sorry to report further difficulties with
nls and profiling and constraints ... the problem
this time (which I didn't check for in my last
round of testing) is that the nls profiler doesn't
seem to respect constraints that have been
set when using the port algorithm.
See test code
2013 Jan 26
1
[LLVMdev] MCJIT/interpreter and iostream
As of LLVM 3.2, is it possible to use iostream with the MCJIT or interpreter execution engines? I'm getting some errors...
Each of these commands correctly prints "hello":
echo -e '#include <stdio.h>\nint main(){ printf("hello"); }' | clang -cc1 -emit-llvm-bc -x c++ | lli -use-mcjit
echo -e '#include <iostream>\nint main(){ std::cout <<
2005 Aug 24
1
histogram method for S4 class.
Hi,
I'm trying to develop an histogram method for a class called "FLQuant"
which is used by the package FLCore (http://flr-project.org). FLQuant is
an extension to "array". There is an as.data.frame method that coerces
flquant into a data.frame suitable for lattice plotting. The problem is
that when I coerce the object and plot it after it works but if the
method is
2005 Aug 24
1
histogram method for S4 class.
Hi,
I'm trying to develop an histogram method for a class called "FLQuant"
which is used by the package FLCore (http://flr-project.org). FLQuant is
an extension to "array". There is an as.data.frame method that coerces
flquant into a data.frame suitable for lattice plotting. The problem is
that when I coerce the object and plot it after it works but if the
method is
2012 Feb 13
1
comment lines sometimes removed from a function on exit from internal R editor
Dear All -
The problem: comment lines in an R function (lines beginning with # ) are *sometimes* removed on leaving the R default editor (same with notepad).
I'm working on a Windows machine with R version 2.14.1.
An example is below. Couldn't find anything that seemed to relate to this in the Changelog. I don't recall encountering this behavior with previous versions of R. Any
2006 Mar 13
2
Error Message from Variogram.lme Example
When I try to run the example from Variogram with an lme object, I get
an error (although summary works):
R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.2.1 (2005-12-20 r36812)
ISBN 3-900051-07-0
...
> fm1 <- lme(weight ~ Time * Diet, BodyWeight, ~ Time | Rat)
Error: couldn't find function "lme"
> Variogram(fm1, form = ~ Time | Rat, nint =
2002 Apr 01
1
An introduction to R (PR#1426)
(I sent this earlier, but it seems not to have come through, due to
problems witkh my system)
The following command from appendix A, "a sample session", isnt correct:
contour(x, y, fa, nint=15)
when used R protests:
Warning message:
parameter "nint" couldn't be set in high-level plot() function
it should probably be nlevels, as used a few lines before.
This is
2007 Jun 24
2
matlab/gauss code in R
Hi all!
I would like to import a matlab or gauss code to R.
Could you help me?
Bye,
Sebasti?n.
2007/6/23, r-help-request en stat.math.ethz.ch <r-help-request en stat.math.ethz.ch>:
> Send R-help mailing list submissions to
> r-help en stat.math.ethz.ch
>
> To subscribe or unsubscribe via the World Wide Web, visit
>
2012 Sep 13
2
Shading in prediction intervals
I have the following code for the minimum and maximum of my prediction interval
> y.down=lines(x[x.order], set1.pred[,2][x.order], col=109)
> y.up=lines(x[x.order], set1.pred[,3][x.order], col=109)
domain=min(x):max(x)
polygon(c(domain,rev(domain)),c(y.up,rev(y.down)),col=109)
It doesnt seem to shade the right region, it gives me a trapezoid.
Any help? Thanks!
2008 May 15
1
lattice histogram problem with integers values and nint
been puzzling over this for a day.
Summary
integer variable to use with histogram, 170,000 rows. Value is day of
year. Hist works, lattice histogram with nint does not work (spurious
spikes in display), lattice histogram using breaks=c(0:365) works
fine. Spike values appear to be sum of two adjacent bins. Want to
know if this is a familiar problem, and what the recommended
work-around is.
2010 Oct 13
1
Lattice: arbitrary abline in multiple histograms
Dear list.
I have three histograms and I want to add a vertical abline in a different
place in each plot. The next example will plot a vertical line at x=5.5 in
the three plots:
rnorm(100,5,3) -> A
rnorm(100,7,3) -> B
rnorm(100,4,1) -> C
rep(c("A","B","C"),each=100) -> grp
data.frame(G=grp,D=c(A,B,C)) -> data
histogram(~ D | G, data=data,
2013 Dec 10
4
[LLVMdev] lit: deprecating trailing \ in RUN lines
On 10/12/2013 19:47, Jim Grosbach wrote:
>
> On Dec 10, 2013, at 11:26 AM, Alp Toker <alp at nuanti.com
> <mailto:alp at nuanti.com>> wrote:
>
>>
>> On 10/12/2013 18:03, Jim Grosbach wrote:
>>>> That causes dissonance between what the compiler sees and what
>>>> lit.py sees for no particularly good reason. One of the nice
2009 Apr 28
2
Dropping 'empty' panels from lattice
I have 8 cofactors possibly affecting one and only one variable.
I make conditional histograms:
<-pdf(file="tst3.pdf",paper="special",width=36,height=36)
<-histogram(~Oversized|dat$c1*dat$c2*dat$c5*dat$c6*dat$c7*dat$c8*dat$c9*dat$c10,nint=21,layout=c(32,8),data=dat,type="count")
<-dev.off()
This works (compliments to R developers!) but it does generate a
2013 Jan 26
2
confidence / prediction ellipse
Hi,
I'm using the R library(car) to draw confidence/prediction ellipses in a
scatterplot.
>From what i understood the ellipse() function return an ellipse based
parameters: shape, center, radius .
If i read dataEllipse() function i can see how these parameters are
calculated for a confidence ellipse.
ibrary(car)
a=c(12,12,4,5,63,63,23)
b=c(13,15,7,10,73,83,43)
v <-
2018 Jan 17
1
mgcv::gam is it possible to have a 'simple' product of 1-d smooths?
I am trying to test out several mgcv::gam models in a scalar-on-function regression analysis.
The following is the 'hierarchy' of models I would like to test:
(1) Y_i = a + integral[ X_i(t)*Beta(t) dt ]
(2) Y_i = a + integral[ F{X_i(t)}*Beta(t) dt ]
(3) Y_i = a + integral[ F{X_i(t),t} dt ]
equivalents for discrete data might be:
1) Y_i = a + sum_t[ L_t * X_it * Beta_t ]
(2) Y_i
2003 Nov 04
2
help with nomogram function
I have fitted a logistic regression model
> failed.lr2$call
lrm(formula = failed ~ Age + task2 + Age:task2, data = time.long,
na.action = na.omit)
using the Design package functions and would like to generate a
nomogram from this model.
the datadist information is generated and stored in
> ddist
time.long$Age time.long$task2
Low:effect 45